 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Mon Jun 09, 2008 3:22 pm background repeat |
|
|
|
I have this code for the CSS
| Code: |
body {
text-align: center;
height: 100%;
font: .88em helvicta, sans-serif;
background-color: #AA0080;
background-image:url('images/back.jpg');
background-repeat: repeat;
} |
which works well, except I do not want it to repeat. If I add this code:
| Code: |
body {
text-align: center;
height: 100%;
font: .88em helvicta, sans-serif;
background-color: #AA0080;
background-image:url('images/back.jpg');
background-repeat: no-repeat;
}
|
The picture does not show at all in IE7 but the background colour shows instead. Can anyone tell me what is wrong? |
|
sticks464
Joined: 31 Dec 2006 Posts: 993
|
Posted: Mon Jun 09, 2008 8:01 pm |
|
|
|
Try
| Code: |
| background-image:url('../images/back.jpg'); |
|
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Tue Jun 10, 2008 1:12 am re |
|
|
|
| OK I will try that but I have never done it before, maybe that will help. |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Tue Jun 10, 2008 2:57 am re |
|
|
|
hello
That fix did not work, but the only way I could get it to work is when I took off the background colour. So I just had a background image, I realise this is wrong but it does work. |
|
sticks464
Joined: 31 Dec 2006 Posts: 993
|
Posted: Tue Jun 10, 2008 3:34 am |
|
|
|
| I have never been able to get any styles to work using quotes if the css is embeded, only when I use an external style sheet. That's what I automatically assumed when I saw the quotes. |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Tue Jun 10, 2008 1:08 pm re |
|
|
|
| yes, the quotes always work OK for me, its just when I try and do the shortcuts way on the background image and colour and position etc. I can never seem to get it right. Well when I validate it, it will throw up an error of no colour for the background, but I am past all that now, as long as it works is my motto. Of course I would like to find a fix, but the internet does not seem to have one specifically for this problem, that I can find. |
|
Dyami
Joined: 20 Jul 2008 Posts: 30
|
Posted: Sun Jul 20, 2008 10:45 pm |
|
|
|
background-repeat: repeat;
should use to set background in all over page and table. |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 821 Location: Biloxi, MS
|
Posted: Thu Jul 31, 2008 4:50 pm |
|
|
|
Do it the easy and proper way:
| Code: |
body {
text-align: center;
height: 100%;
font: .88em helvicta, sans-serif;
background: #aa0080 url('images/back.jpg') no-repeat center scroll;
} |
Or if you want contents to scroll and image fixed, change 'scroll' to 'fixed'. If you want background image position other then 'center', then use the other values you want:
op left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y%
xpos ypos
Just be sure path to background image is correct.
Cheers - |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|