Forum Moderators: not2easy

Message Too Old, No Replies

Mozilla/IE div differences

         

tjcowart

11:55 pm on Apr 18, 2006 (gmt 0)



I have a blog template that in IE looks great, in Mozilla its acting weird.

#content {
width:710px;
margin:0 auto;
padding:0;
text-align:left;

}
#main {
width:380px;
float:left;
font-family: Arial, Verdana, Sans-Serif;
font-size: 11px;
}
#sidebar {
width: 300px;
margin-top: 20px;
float:right;
font-family: Arial, Verdana, Sans-Serif;
font-size: 11px;

}

<div id="content">
<div id="main">this is the content</div>
<div id="sidebar">this is the sidebar</div>
</div>

Why in IE would the page look fine, but in Mozilla, my sidebar div gets knocked to the bottom and actually is sitting inside my main div. of course there's a lot more code to the page and the problem most likely lies there. When I add an extra </div>, thinking that somehow the main div isn't closing, the sidebar moves back next to the main div where it belongs...but then it won't recognize the sidebar font attributes.

Help?

Setek

3:16 am on Apr 19, 2006 (gmt 0)

10+ Year Member



Is there any padding to your elements? It could be too wide (width doesn't include padding), and is pushing one floated element below another.