scrolling box
how do i get a table, which i want to be a specific size, to scroll its contents if the contents are bigger than the table instead of stretching it? ive tried iframes and they make everything difficult. i also tried the overflow thing in the stylesheet but i cant seem to make that work the way i want it to. are there any other options?
Roo posted this at 16:45 — 3rd November 2005.
She has: 840 posts
Joined: Apr 1999
Can you be more specific?
If you are asking if a table itself can have a scrolbar, the answer is no. To get a scrollbar in an element, you'd need to use an iframe or a div set to overflow.
Roo
The Webmistress posted this at 17:52 — 3rd November 2005.
She has: 5,586 posts
Joined: Feb 2001
Do you mean to have like a long sentence scrolling? You'd have to use a marquee but I'm not sure which browsers support it.
kazimmerman posted this at 20:26 — 3rd November 2005.
He has: 698 posts
Joined: Jul 2005
To use the overflow property, as you stated in your post, it needs to be applied to a DIV (and maybe other tags, but I'm pretty certain a table will not work). Basically, you would do something like this:
<div style="overflow:auto;width:500px;height:250px;">
<p>Stuff...</p>
</div>
Of course, you can place the CSS in the or in an external file, but this is was the easiest way to show.
Kurtis
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.