[HTML] Scroll Bar In Text Box/Window
Hello everyone, i have created a simple web site for school assignment and since i dont wanna stretch it to fit the whole information, how can i make a scrollable window within the web page?
i heard its another web page inside ur current web site, yet i dont know how that works.
Yes i have looked on google, yet i just dont know how to insert them or how they work.
Thanks in advance.
Re: [HTML] Scroll Bar In Text Box/Window
Re: [HTML] Scroll Bar In Text Box/Window
There are two ways of going about this (well, there are probably more, but two obvious ones):
1. The 'old', depricated, but easy way: use a frame / iframe. Set the content in a frame, it will automatically scroll if you use a fixed framesize. Google can help you here.
2. The 'new', CSS way: use a style element and set its overflow attribute to scroll:
Code:
<div style='height: 300px; width: 200px; overflow: scroll;'>
Lots of text here
</div>
Alternatively you can use a CSS to do this for you, which is the proper way these days. More info on the overflow attribute
Re: [HTML] Scroll Bar In Text Box/Window
Quote:
Originally Posted by
FragFrog
There are two ways of going about this (well, there are probably more, but two obvious ones):
1. The 'old', depricated, but easy way: use a frame / iframe. Set the content in a frame, it will automatically scroll if you use a fixed framesize. Google can help you here.
2. The 'new', CSS way: use a style element and set its overflow attribute to scroll:
Code:
<div style='height: 300px; width: 200px; overflow: scroll;'>
Lots of text here
</div>
Alternatively you can use a CSS to do this for you, which is the proper way these days.
More info on the overflow attribute
Ok thank you i have tried the second method and got it working thanks.