PDA

View Full Version : "overflow: auto" scrollbar question


marilynn.fowler
08-15-2006, 11:31 PM
If I set "ul {overflow: auto;}" without setting the height will it consistently stretch to fit the list items, or will I get the scrollbar? I'm asking because I have a bunch of floated list containers which wrap depending on the width of the user's browser window, so I can't reasonably set a height for the ul.

Most places I looked seemed to perform the way I'd hoped, but I did see it on an older version of Safari where the scrollbar appeared even though I had set the ul height to be taller than the list items. Since it's only my second 100% CSS positioning project, I wasn't sure if my scrollbar issue was due to it being an older version or if it's supposed to happen.

_Aerospace_Eng_
08-16-2006, 12:55 AM
Without a width or height set it really shouldn't show the scrollbar.

Kravvitz
08-16-2006, 12:59 AM
I often use the easy clearing hack instead of overflow:auto to contain floats.

http://www.csscreator.com/attributes/containedfloat.php
http://www.positioniseverything.net/easyclearing.html

marilynn.fowler
08-17-2006, 06:17 AM
Thank you.