Forum Moderators: not2easy
body {margin:0; padding:0px; background-color:#c0c0c0; font-family:Tahoma; color:#7a7a7a; font-size:11px; font-weight:normal; text-align:center;}
#main {width:800px; margin:0 auto; background-color:#FFFFFF; border-right:1px solid #000000; border-left:1px solid #000000; padding-left:2px; padding-right:2px; }
& the html this way..
blha blah
the problem in 'firefox' is the main div gets in center but it shows the gray bg colour & not the white bg as per css...& if I gave float:left...it shows...but ofcourse it is going to get alligned to left..& not the center
Now how do I resolve this issue.. shrug
Thanks
suraj
Did this clarifies something..?
Thanks
A couple options:
Put another wrapper inside #main. Make this wrapper floated, and assign the background color to it.
Another option is to put a clearing element at the very end of #main.
<div id="main">
...
<br style="clear: both;">
</div>
Now, there's is also a much neater solution to this, which does not involve adding additional elements. It has something to do with the
overflow property, I believe ... but I can't remember the details right now.