 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
quartzy
Joined: 26 Dec 2007 Posts: 405
|
Posted: Mon Apr 28, 2008 1:41 pm background alignment on body |
|
|
|
I have an image that is 834px wide, the body is 800px wide so that should give me 17px on each side for the border to show, except it does not show correctly ie fit tightly to the body edges down two sides. Dont know how to center the image so it will fit exactly behind the body. Does anyone know?
| Code: |
body {
font-family: Helvetica, Verdana, Arial, sans-serif;
font-size: 0.88em;
color: #FFFFFF;
text-align: center;
background: #000000 url('images/background.gif')repeat-y fixed;}
#container {
width: 800px;
height: 100%;
margin: auto;
text-align: left;
border: 1px solid #625e00;}
|
I have found out how to do it now, from a template I found.
| Code: |
| repeat-y center top; |
|
|
sticks464
Joined: 31 Dec 2006 Posts: 1171
|
Posted: Mon Apr 28, 2008 1:56 pm |
|
|
|
For centering with a centered fix layout change
background: #000000 url('images/background.gif')repeat-y fixed;}
to background: #000000 url('images/background.gif')repeat-y top center;} and it should work. You wouldn't need the fixed attribute unless you wanted the image to remain on the screen while the content scrolls. |
|
quartzy
Joined: 26 Dec 2007 Posts: 405
|
Posted: Mon Apr 28, 2008 1:59 pm re |
|
|
|
| hi guessed we posted at the same time, while I am here can you fit a class on a <br>? as it dont seem to work I have an image on the break too. |
|
sticks464
Joined: 31 Dec 2006 Posts: 1171
|
Posted: Mon Apr 28, 2008 2:08 pm |
|
|
|
I've never tried to do a class on a <br>. But it shouldn't be any different than a class on the img tag.
| Code: |
br {
blah:...;
blah:...;
blah:...;
} |
|
|
quartzy
Joined: 26 Dec 2007 Posts: 405
|
Posted: Mon Apr 28, 2008 2:38 pm re |
|
|
|
| yes, I tried it but it does not work. Now I have to find a fix, as the centered border down the sides on the body does not show in IE7 and probaly IE6. |
|
|
|
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
|
|
|
|
|
 |
|
|
|
|
|
|
|