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
https://forums.phpfreaks.com/topic/288009-div-off-page-but-no-scroll-bar/
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%.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.