Click to See Complete Forum and Search --> : Scrollable area
flatlander
01-27-2005, 10:35 AM
Hey All,
I've been trying to figure out how they did this website:
http://www.alphawerks.com/alpha_frameset_headers.htm
I want to add the same type of manually scrollable area to a web page. I looked at the source code and I keep seeing "frameset" mentioned.
Anyone know the code for adding a scrollable content area (without actually using frames?).
Thanks much,
Jill
The basic method:
<div style="width:200px;height:200px;border:1px solid red;overflow:auto;">
<p style="width:170px;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Donec orci lacus, tempus ut, ultricies sed, volutpat non, erat. Ut semper nisl at velit.
Vivamus lacus wisi, ultrices non, vulputate id, lobortis ac, magna.
Donec tellus est, feugiat non, dictum et, faucibus a, dolor.</p>
</div>
The width of the inner element(<p>) must be smaller than its container.
the tree
01-27-2005, 12:11 PM
<style type="text/css">
/* for a div with the id attibute equal to 'scroller' */
div#scroller{
width: 100%; /* or whatever */
hieght: 80%; /* ditto */
overflow: scroll;
}
</stlye>
edit, whoops didn't see your post.
flatlander
01-27-2005, 12:16 PM
hey thanks,
I just tried it out and it works awesome!
Did you know what it will display of the browser can't read CSS?
- Jill
the tree
01-27-2005, 12:30 PM
It would just show the whole thing, context allowing.
MstrBob
01-27-2005, 12:39 PM
Originally posted by flatlander
hey thanks,
I just tried it out and it works awesome!
Did you know what it will display of the browser can't read CSS?
- Jill
Considering that the above will display fine in IE 5+, Mozilla, Opera, Safari, you're pretty much set in terms of graphical browsers. ;)
flatlander
01-27-2005, 12:41 PM
SWEET - can't wait to use it!
Thanks again for all the help!
Jill