Click to See Complete Forum and Search --> : Keeping a <Div> Fit


Sup3rkirby
07-18-2005, 05:16 PM
I would like to know how you can set a div so that it will not resize if/when new data is inserted, but rather just use a scrollbar to see the info.

Obviously the scrollbar only needs to be there when the content becomes bigger than the div. And this is for vertical stuff, horizontal is fine.

spufi
07-18-2005, 06:24 PM
Overflow (http://www.w3schools.com/css/pr_pos_overflow.asp)

Define the height of the <div> and you should be set.

Sup3rkirby
07-18-2005, 06:38 PM
ahhh... the overflow. Thank you.


P.S.
My IE Fox will SmOkE your Firefox anyday... j/k. haha. Go FF!

Sup3rkirby
07-18-2005, 06:40 PM
any way to only use vertical scrolling? didn't see it on that page.... and that's all I need(want), but i'm fine with what I have now.

NogDog
07-18-2005, 07:07 PM
Usually, if you use overflow: auto; it only displays the vertical scroll bar unless there is some piece of content (such as a graphic or very long word) than cannot be split across lines and is too wide to fit in the box.