Prev | Current Page 270 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

IE versions up to and including 6 have numerous float-related bugs.30
Floating an element will only shift it to the left or to the right??”you can??™t move an
element up or down with the float property. Consequently, a float-based layout
can become very tricky if you want to preserve a certain source order in your markup.
30 See http://positioniseverything.net for well-documented workarounds.
CSS Layout and Formatting
The Ultimate CSS Reference 184
There are ways to do this using a combination of negative margins and relative
positioning,32 but if you use them, you??™ll likely run into many nasty IE bugs.
Using absolute positioning incurs fewer browser compatibility problems, although
IE and older versions of Opera (prior to version 9) use the wrong containing block
in some cases. As long as you (and the browser) know your containing blocks, you
can shift parts of the content around without being bound by the source order to
the same extent that you are when working with floats.
Absolute positioning has its own complications, though.


Pages:
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282