Another crossbrowser issue.....

liunx

Guest
....with float. I hate a main div 540px wide, a left nav 100px wide, and a right div containing text that is 370px wide. In IE the float right command brings the text on the same level as the nav, to the right. In gecko, it almost looks like I used the clear command, which I didn't. It renders way down on the page, almost below the nav's bottom, although they do overlap. I don't want to use absolute positioning, and shouldn't need to. There's plenty of room for the 2 to co-exist in the main div. Anyone know why it isn't?

#main{ width:540px;text-align:center;margin:auto }
#nav{ width:100px; height:400px; margin:10px 10px 0px 10px ;padding:0;border:0;float:left }

.text{ float:right;margin:10px 0px 0px 0px;width:370px; }Use floats when you actually mean the block to float. Otherwise, absolute positioning of side blocks with appropriate margin for the center block is much more robust.But there's only 2 blocks. Float left and right should have them coexisting inside the main div, on the same level, provided there's enough room, which there is.I got it. I had to set the width of the containing div around the text.
 
Back
Top