| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2006
Location: London
Posts: 31
|
3 column float CSS layout
Further to advice I got yesterday I have re-coded this page so as to use floats rather than absolute positioning, as well as some other layout changes. It works fine in safari and firefox, but it goes to pieces in Internet explorer. Help! |
|
|
|
|
|
#3 (permalink) |
|
dt immigrant
|
Internet explorer behaves quite erratically when you use paddings/combined with margins. Anyway a trip to www.positioniseverything.net might set you on the right track http://www.positioniseverything.net/ie-primer.html http://www.positioniseverything.net/...loatmodel.html |
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Jan 2006
Posts: 3
|
I remember in Zeldman's "Designing With Web Standards", his account of floats was far from positive. What are the situations in which one would use absolute / relative positioning as opposed to floats? I design largely floats and seldomly find a situation where absolute / relative positioning can accomplish something better than floats. What are the virtues of absolute / relative positioning? |
|
|
|
#6 (permalink) |
|
dt immigrant
|
Well, speaking from my own point of view, most of the time it's simpler to use floats. Take for instance, my site. (I know it's not the best of sites, but it's simpler to demonstrate). The bottom lists are floated left, with a single line of code #whateverContainer ul {float:left;} If, for whatever reason I decide to change the order they display, all I have to do, is change "left" with "right". If I had all of them absolutely positioned, I'd have to change four items #whateverContainer ul#idOne {position:absolute; left:128px;} #whateverContainer ul#idTwo {position:absolute; left:312px;} etc. On the same site I use absolute position to bring up the more link, which in the source is the last item, to the top, only for sylistic purposes, if you want. Anyway, I know this is not much of an explanation, but I hope you understand what I mean. Floats allow for the creation of a flexible structure, while absolute position generates a rigid grid for the elements of a page, which may not be always desirable. Emil |
|
|
|
#7 (permalink) |
|
Sir digby chicken caesar
Join Date: Sep 2004
Posts: 4,887
|
floats are fine in my experience... its absolute positioning that can be a sod. http://www.bluerobot.com/web/layouts/ This site might help the thread starter... its the first one I stumbled across in my CSS favourites. |
|
![]() |