CSS vertical scrollbars
- Started
- Last post
- 14 Responses
- Dancer
Hi,
I have a div tag with copy in it and I do not want the div to go beyond a certain height when I add more content. is there a way to fix it and have a scroll bar instead.
thanks
D
- ScottTheRobot0
Maybe this is a cop-out... but you could use an iframe
- Dancer0
yep, cop-out
and I've never used iframes ;)
- ScottTheRobot0
Well, call me Thomas Kinkade!
- brandelec0
you're gonna be needing frames for scrollbars me thinks
- E__________0
yep, its a style property called overflow:auto I believe. Their are a couple more values you can give overflow property, depending on which scrollbars you want (horz, vert).
- E__________0
what I meant (it's late):
yep, its a style property called overflow:auto. There are a couple of other values you can give to it, depending on which scrollbars you want (horz, vert, none).
- gabriel20
bit more in depth:
- scarabin0
i've used divs with scrollable content inside before. it just needs some javascript and button images to get it going.
search around for the script.
- Dancer0
Cool E, that is right, auto works but I would like to define it a little more (ie Horiz) but I don't know the correct syntax
overflow: horizontal;
- E__________0
I digged a bit deeper into my brain and found that it is:
overflow-x
or
overflow-ydepending on which one you want.
If you want both, just use overflow
- easy_target0
width:whatever px;
height:whatever px;
max-height:whatever px
max-width:whatever px
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #ffad00;
font-size: 9px;
overflow:auto;
/* this only works for IE*/ scrollbar-face-color: #ff6600; scrollbar-highlight-color:#99000... scrollbar-3dlight-color: #990000; scrollbar-darkshadow-color:#9900... scrollbar-shadow-color:#990000;
scrollbar-arrow-color: #ffffff;
scrollbar-track-color: #990000;try that in your css
- Dancer0
K, should off refresed before I posted that (damn my 56k), thanks will try and read a few of these. thanks for the help all.
- Dancer0
Nice thanks Easy, all your help is much apprciated.