| View previous topic :: View next topic |
| Author |
Message |
magicthegatherist
Joined: 04 Mar 2008 Posts: 7
|
Posted: Tue Mar 04, 2008 6:40 am Post subject: Scrolling in the page |
|
|
My question is with regards to an area within a page that can contain further page data, but with a fixed size, and scroll bars.
Specifically, I'm designing a page that uses layers to divide up areas of the page. The page size is small enough that the layers should easily fit on any average or higher (800x600) resolution screen. What I wish to do, is have an area, fixed in size (say, 400x500 for example) within the main display layer, that will have all the page data.
The user would then scroll through this area to read any data, without having to scroll the actual page.
I really don't want to use frames, what sort of element can I use?? |
|
| Back to top |
|
 |
|
|
rangana 250+ Club

Joined: 27 Feb 2008 Posts: 439 Location: Cebu City Philippines
|
Posted: Tue Mar 04, 2008 6:56 am Post subject: Re: Scrolling in the page |
|
|
You could use <div> and utilize its overflow property.
See this code:
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
#wrap
{
height:100px;overflow:auto;
width:500px;
font-family:Tahoma,Verdana;
font-size:10pt;
border:1px solid #222;
padding:10px;
}
</style>
<title></title>
</head>
<body>
<div id="wrap">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur non quam vel magna lobortis ornare. Nunc varius sollicitudin orci. Ut orci elit, imperdiet in, mollis luctus, tempus at, nisi. Nulla gravida neque euismod lacus. In vel nisl. Sed commodo. Maecenas enim ligula, ullamcorper vitae, condimentum at, tempus ut, massa. Donec velit. Sed velit nisi, pretium sit amet, adipiscing sit amet, aliquet et, quam. Morbi luctus, tellus eu consectetuer placerat, leo neque sollicitudin orci, et egestas orci pede vitae velit. Suspendisse nisl. Sed et augue.
<br/>
Pellentesque eu risus. Cras iaculis sagittis elit. Phasellus vitae justo. Phasellus non nisl ac elit adipiscing molestie. Suspendisse eu arcu ut odio tristique varius. In hac habitasse platea dictumst. Aenean at justo. Integer varius erat vel elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus sed diam.
<br/>
Donec elit tellus, auctor sed, scelerisque porttitor, pulvinar eget, risus. Nullam non erat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras mauris enim, rutrum et, placerat ac, tincidunt a, augue. Nam ornare. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur nec urna. Etiam pretium nibh. Aenean tristique egestas tortor. In at enim eu risus blandit semper.
</div>
</body>
</html>
|
See if it helps  |
|
| Back to top |
|
 |
magicthegatherist
Joined: 04 Mar 2008 Posts: 7
|
Posted: Tue Mar 04, 2008 8:07 am Post subject: Re: Scrolling in the page |
|
|
Haha, thanks alot, I had actually sorted it out before hand and was sidetracked tackling another issue.
I haven't worked with web design for awhile, and /div has brought it all back now
overflow:auto;
Thanks again! |
|
| Back to top |
|
 |
rangana 250+ Club

Joined: 27 Feb 2008 Posts: 439 Location: Cebu City Philippines
|
Posted: Tue Mar 04, 2008 8:12 am Post subject: Re: Scrolling in the page |
|
|
No problem!...You're completely welcome  |
|
| Back to top |
|
 |
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|
|