Jump to content

Div off page but no scroll bar


slj90

Recommended Posts

The 'content' div is taller than the page but no scroll bar appears. Please help.

<style>
body{
background-color:ffaaf5;
}

#title {
background-color:ffffff;
height:8%;
width:29%;
left: 35%;
top: 5%;
position:fixed;
border-radius:25px;
padding:1%;
text-align:center;
}

#nav1 {
background-color:ffffff;
height:8%;
width:49%;
left: 25%;
top: 20%;
position:fixed;
border-radius:25px;
padding:1%;
text-align:center;
}

#content {
background-color:ffffff;
height:80%;
width:79%;
left: 10%;
top: 35%;
position:fixed;
border-radius:25px;
padding:1%;
text-align:center;
}

</style>

<html>

<body>
body
</body>

<div id="title">
<font size=10> title</font>
</div>

<div id="nav1">
nav1
</div>

<div id="content">
content</div>

</html>
Link to comment
Share on other sites

It looks like the content is too tall for the window. The scroll bar doesn't appear because you're using "position:fixed;" which removes your divs from the normal flow of the page.

 

For what it's worth, I was able to get the last div to fit on the page by changing the height to 60%.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.