Click to See Complete Forum and Search --> : div not staying put


rhsunderground
10-22-2005, 01:27 AM
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?


www.skinneralamod.com/city/menupage.html

Daniel T
10-22-2005, 01:40 AM
How dare you not use a doctype!

David Harrison
10-22-2005, 01:43 AM
That's because you floated one of the columns so they can quite happily flow around each other.

Have a read of this (http://www.alistapart.com/articles/negativemargins/).

And for a better understanding of floats, Tommy does a good job of explaining it (in EXTREME detail) here (http://www.autisticcuckoo.net/archive.php?id=2004/12/10/floating).

Edit: Oh yeah, and holy crap at that JavaScript, your nav don't work at all without it. Check these out; Suckerfish (http://www.alistapart.com/articles/dropdowns/), UDM4 (http://www.udm4.com/).

ray326
10-22-2005, 01:51 AM
. . . 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;
}

rhsunderground
10-22-2005, 12:33 PM
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 :p

ray326
10-22-2005, 03:37 PM
ray - 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.

David Harrison
10-23-2005, 01:27 AM
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.