|
| |
|
|
ncriptide
Posts: 23 Joined: 10/2/2007 Status: offline
|
Page and background not centering - 11/24/2007 10:54:12
I'm a beginner CSS coder, so I'm sure I've done something extremely stupid: I have a wrapper div that is 850px wide. I have set margins to: 0 auto; It looks fine on a Mac running Firefox or Explorer, but when viewed on IE 5 or 6 on a PC, the background image is off and the site is flush left - not centered. My header div is 800px wide and centered, and my main content dive is 800px and centered, so the background image of the wrapper will show on sides and top evenly. Here's the url: http://www.hudsontrailers.com Here's the css: body { background-color:#003300; font-family:Palantino "Times New Roman", Times, serif; font-size: 1em; text-align:left; } #wrapper { background-image:url(../images/bkgnd.jpg); background-attachment:fixed; width: 850px; height; margin: 25px auto; padding:25px 0; } #header { background-color:#003300; border-top:medium solid #FFFFFF; border-right: medium solid #FFFFFF; border-left: medium solid #FFFFFF; width: 800px; margin: 0 auto; padding:0; } #main { clear:both; background-image:url(../images/images/main_bkgnd.jpg); width:800px; margin:0 auto; padding:0; border-left: medium solid #FFFFFF; border-right: medium solid #FFFFFF; border-bottom: medium solid #FFFFFF; } Any help would be greatly appreciated.
|
|
|
|
ncriptide
Posts: 23 Joined: 10/2/2007 Status: offline
|
RE: Page and background not centering - 11/24/2007 17:41:49
Problem solved! Had to add the following to the wrapper div: position:absolute; left: 50%; margin-left: -425px; Along with your suggestion of: body { text-align:center; } #wrapper { text-align:left; } Everything is smelling like roses on IE 5 & 6 now . . . thanks for all your help!!!!!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|