auto margin

qkrghkahr

New Member
I finished my site but the body isn't centered if I zoom or access the site throuhg a widescreen monitor. I tried setting the margin-left and margin-right to auto and see if that would center the body but it didn't....any ideas?
the website is at


www.msu.edu/~parkhwam
 

Nathan Joshua

New Member
In order to achieve this, you need to have everything inside the wrapper div.

Code:
<style type="text/css">
#wrapper{
position:dynamic;
margin-right:auto;
margin-left:auto;
}
</style>
</head>
<body>
<div id="wrapper">
 <div>
  header
 </div>
 <div>
  content
 </div>
 <div>
  footer
 </div>
</div>
</body>
Hope this helps :)
 

ronaldroe

Super Moderator
Staff member
Wrapper div? position:dynamic? He has the first one and it isn't working, and the second doesn't exist.

Get rid of #contentArea and #bannerArea. They're unnecessary, and are likely causing the issue. From there, make sure that everything you want centered has a set width, and there are no other padding or margins applied that could be throwing it off.
 

Phreaddee

Super Moderator
Staff member
position:dynamic;
bwahahaha! ROFL.

How have I never come across this one before.

Client: Hi, I really like the website you've created, but I dont know it just feels a bit I dont know, static.

Webdesigner: just one sec...
(goes in and changes body{position:static;} to body{position:dynamic;})
Hows that?

Client: PERFECT! ...
 
Top