thatidiotguy
thatidiotguy

Reputation: 8991

Scroll Box for Display HTML content

So I have a situation where I want to put a very long Terms of Use document onto a page on my company's web site, but it was way too long to put in the main "content" area. I would like to use a scroll area, so that user can see the terms of use as rendered originally. So you can see what I mean, I need the entire section c off of the Apple web page:

http://www.apple.com/legal/itunes/us/terms.html#APPS

I looked into putting the HTML code for that section of the Terms of Use in <textarea> element, but apparently <textarea> will not render HTML code. Is there a solution so that I do not have a web page like 4000px high? Thanks.

Upvotes: 1

Views: 4960

Answers (3)

Mat Richardson
Mat Richardson

Reputation: 3606

You can create a div to contain the content and specify a height, then user overflow: auto in your CSS to make it scrollable.

Like this:-

http://jsbin.com/ifolaf/2/edit

Upvotes: 2

Mike
Mike

Reputation: 781

Put the content into a div with a fixed height, and set the css overflow property to 'auto' this will create a scrollable div

<div style='height:80px; overflow:auto;'>
content here
</div>

of course you should use a separate style sheet but that's a different story

Upvotes: 8

Westy92
Westy92

Reputation: 21295

You could create another .html file and have an <iframe> of it embedded with a set height and width.

Upvotes: 1

Related Questions