Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling an area 2

Status
Not open for further replies.

Trentham

Technical User
Nov 9, 2002
67
GB
I have a need to have a fixed size area in the window but the text it contains may exceed its capacity. Is there any way I can make it scroll.

I know I could set up a frame to do this but want to avoid frames. I know a list box will scroll but I want to have the full power of HTML and CSS formatting. I know I could embed a Java applet to get this but I don't want to go down that line either.

Any ideas or is it just not possible within the constraints of HTML and CSS?
 
<div style=&quot;overflow:scroll;width:100px;height:50px;&quot;>Lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots of content here.</div>
 
Ah, excellent. Many thanks for your prompt reply :)
 
interesting - have a look at the CSS2 spec for this (scroll
This value indicates that the content is clipped and that if the user agent uses scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped. This avoids any problem with scrollbars appearing and disappearing in a dynamic environment. When this value is specified and the target medium is 'print' or 'projection', overflowing content should be printed.


IE6 and NN7 on W2K printed your div looking just like it did on screen rather than printing the full content - not supported or do I need to specify it somehow in a media=print stylesheet?

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
I'd always suggest using the medi=print stylesheet, then you can set the overflow to 'visible' for print and 'scroll' or 'auto' for screen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top