[thelist] pros and cons of absolute positioning in css

Rick Hurst rick.hurst at gmail.com
Thu Feb 24 07:22:32 CST 2005


> Can someone tell my why absolute positioning is not recommended, or let
> me know if I'm torturing myself unnecessarily?

it has it's uses, especially if you are restricted by working with
templates that you aren't allowed to change the HTML. I use it quite a
bit for things like plucking a search form out of the document flow
and postioning at the top of the page.

As Peter- Paul pointed out, the main problem with absolutely
positioned elements is that they aren't "aware" of other elements, so
if you need to change the height or width of an element, you may need
to manually reposition other elements to avoid overlap, and if the
dimension change is the result of a dynamic operation such as
text-resizing, or an unknown amount of text being pumped in from a
database you haven't got control of that.

Rick Hurst
web developer
work: http://www.netsight.co.uk
play: http://hypothecate.co.uk


More information about the thelist mailing list