View Full Version : I want a vertical scroll on div id. How do I do that?
javasam
10-02-2003, 09:42 AM
<div id="Layername" style="position:absolute; width:#399px; height:#276px; z-index:1; overflow: scroll;">
Hi. I need help. I never done this before. I want a vertical scroll bar on div id. How do I do that?
Thanks in advance.
ronaldb66
10-02-2003, 12:17 PM
Hi,
me neither, but you can start out by removing those #'s out of the width and height declarations; if the content in the div needs more room then is available through its width and height you should get your scroll bars.
liorean
10-02-2003, 12:34 PM
It's pretty easy, really. You just have to make sure the contents of the div are as large as the div, or larger. This can be assured by setting a height of 101% on an absolutely positioned decendant of the div you want to have the scrollbar.
javasam
10-02-2003, 06:14 PM
Originally posted by liorean
It's pretty easy, really. You just have to make sure the contents of the div are as large as the div, or larger. This can be assured by setting a height of 101% on an absolutely positioned decendant of the div you want to have the scrollbar.
Hey Ronaldb66, it works. It's a little stuff like that is causing me grief:) thanks man.
Hey Liorean, i am not sure about your method which it makes my text invisible?
liorean
10-02-2003, 06:17 PM
It shouldn't make anything invisible. Just make sure the actual contents are after the absolutely positioned div in the document flow and things should work fine.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.