div not staying put

liunx

Guest
i'm trying to write a site by hand for a change and all has been going well until i try to create my own columns. they display fine in IE and Opera, but when i open up good old Firefox the right column just scoots over and cuddles the left column. suggestions?


<!-- w --><a class="postlink" href="http://www.skinneralamod.com/city/menupage.htmlHow">www.skinneralamod.com/city/menupage.htmlHow</a><!-- w --> dare you not use a doctype!That's because you floated one of the columns so they can quite happily flow around each other.

Have a read of this (<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/negativemargins/">http://www.alistapart.com/articles/negativemargins/</a><!-- m -->).

And for a better understanding of floats, Tommy does a good job of explaining it (in EXTREME detail) here (<!-- m --><a class="postlink" href="http://www.autisticcuckoo.net/archive.php?id=2004/12/10/floating">http://www.autisticcuckoo.net/archive.p ... 0/floating</a><!-- m -->).

Edit: Oh yeah, and holy crap at that JavaScript, your nav don't work at all without it. Check these out; Suckerfish (<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/dropdowns/">http://www.alistapart.com/articles/dropdowns/</a><!-- m -->), UDM4 (<!-- m --><a class="postlink" href="http://www.udm4.com/">http://www.udm4.com/</a><!-- m -->).. . . but when i open up good old Firefox . . .Of course that's where you should have started then looked at it with the others.

#events {
width: 174px;
margin: 3px 0;
padding: 5px 0;
float:left;
}

#main {
top:180px;
left:180px;
width: 550px;
margin: 10px 10px 0 180px;
padding:10px
float:left;
}thanks guys. i was aware about the menu issue but had never heard of suckerfish nor UDN.


ray - i start in opera - it's my default.

dan - it was 12:30 in the morning, give me a break :pray - i start in opera - it's my default.So is opera getting this wrong? Did the margin fix it everywhere? Was it actually related to the lack of doctype? At any rate, setting margin: 10px 10px 0 187px; in #main clears it up for me in Fx.If you add the DTD then Opera gets it right and it looks like it does in Firefox. There's no such salvation for IE though.
 
Back
Top