Jump to content

Scroll Bar


Primal

Recommended Posts

Good Afternoon,Is the <textarea> tag the only way to have a scroll bar? I am making a layout for a friend and he wanted his main text area and his navigation bar to have a scroll bar, but with <textarea> you can't include anything but preformated text, and no links. (as far as I know.) Is this true, and if so, is there another way to get a scroll bar, such as in a table?Thanks a lot,Primal

Link to comment
Share on other sites

Another way the seemed to work for me once, was the have a Div with a set width and height. Then add this to the style for that div:

overflow: auto;

It gave me a scroll bar when there was too much content inside the Div, but I'm not 100% sure if this is a good idea or not.

Link to comment
Share on other sites

Try <div> with overflow....

<div ID="oDiv" STYLE="width: 200px; height: 200px; overflow: auto;border:1px solid #000000;"><a href="#">Link 1</a> <br /><a href="#">Link 2</a><br /><a href="#">Link 3</a><br /><a href="#">Link 4</a><br /><a href="#">Link 5</a><br /><a href="#">Link 6</a><br /><a href="#">Link 7</a><br /><a href="#">Link 8</a><br /><a href="#">Link 9</a><br /><a href="#">Link 10</a><br /><a href="#">Link 11</a><br /><a href="#">Link 12</a><br /><a href="#">Link 13</a><br /><a href="#">Link 14</a><br /><a href="#">Link 15</a></div>

Link to comment
Share on other sites

Another way the seemed to work for me once, was the have a Div with a set width and height. Then add this to the style for that div:
overflow: auto;

It gave me a scroll bar when there was too much content inside the Div, but I'm not 100% sure if this is a good idea or not.

I like this idea :)Do you think this would work with a table cell??Primal
Link to comment
Share on other sites

There are two pages to look at here. Both use the same code, with only a width and height difference to "hide" the second page's image. It looks just like an i-frame with scrollbars but it isn't...

Link to comment
Share on other sites

Wow!! I really don't understand that!! That's OK though. I think that I'll be able to get what I want anyway. Thanks a lot, everyone. Pulpfiction and jlkaslip, you are amazing, I think you helped me with my last problem as well!!Primal

Link to comment
Share on other sites

You should use overflow:scroll I think :)

Link to comment
Share on other sites

You should use overflow:scroll I think :)
Overflow: scroll; adds a vertical and a horizontal scrollbar, and even if the content doesn't overflow, you still get the inactive scrollbars displayed. I at least much prefer to use auto, so that it only gives you a scrollbar for overflowing content.
Link to comment
Share on other sites

Another way the seemed to work for me once, was the have a Div with a set width and height. Then add this to the style for that div:
overflow: auto;

It gave me a scroll bar when there was too much content inside the Div, but I'm not 100% sure if this is a good idea or not.

Is it possible to have a scroll bar in a table cell without using Frames?? Or simply a box compatible with nested tags that has a scroll bar?Primal
Link to comment
Share on other sites

Is it possible to have a scroll bar in a table cell without using Frames?? Or simply a box compatible with nested tags that has a scroll bar?Primal
If you set the table cell with a fixed width and height, set overflow to auto and make sure the content overflows that fixed height and/or width, then yes. Actually, you won't get a horizontal scrollbar unless you spesifically code your content to stop the automatic linebreak that overflow:auto; does, by using   and such.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...