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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll bar inside a page

Status
Not open for further replies.

superosjecaj

Programmer
Feb 17, 2003
4
SI
Hello!

I'm new in HTML and I'm trying to make a page that would have a scrollbar inside a page (not the one in the browser) like for example: I have looked in the source code, but i cant figure out what is the thing that makes the scrollbar.
 

One way is to use the CSS overflow property:

Code:
<html>
<head>
	<style type="text/css">
		#myDiv {
			width: 200px;
			height: 100px;
			overflow: scroll;
		}
	</style>
</head>

<body>
	<div id="myDiv">
		Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris commodo felis eu nunc. Vestibulum ut lorem id lectus eleifend vehicula. Donec rhoncus ipsum et mauris. Donec et tortor ac nisl blandit tristique. Fusce nibh magna, scelerisque ac, lobortis eget, aliquam id, sem. Suspendisse potenti. Ut sed quam sit amet risus interdum accumsan. Duis tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum vel massa non diam egestas volutpat.
	</div>
</body>
</html>

Hope this helps,
Dan




[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top