[Techtalk] CSS absolute positioning and overflow:hidden

chris lists at semioticpixels.com
Mon Oct 2 06:36:04 UTC 2006

Hey Akkana,
for an absolutely positioned element, the containing block is the
nearest ancestor that has a position other than static (iow, absolute or
relative). In the absence of a positioned container the containing block
is the root document element which is what you saw in your example. 

fwiw, if I were doing this page, I'd float the images inside the
container. I posted an example here
http://www.mosshead.com/tests/akkana.html (I'll remove the example in a
day or 2)

Also, it's a good idea to put image width and height attributes into the
html instead of css - it allows image-loading browsers to render a page
before the images are downloaded. It's more of an issue for pages with a
lot of images or large images, but still a good practice in general.

re: using absolute positioning for a more liquid layout - using
percentages instead of pixel lengths should address the issue of varying
font sizes and resolutions. 


More information about the Techtalk mailing list