Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

100% div not reaching the bottom...

Featured Replies

Hi,

 

I'm in the middle of developing a test HTML/CSS control panel using percentage widths and heights. When there isn't much content the 100% height function works on the CSS sidebar etc but once there is a lot of content and I have to scroll down on the page, the sidebar no longer goes to the very bottom.

 

Any divs I put in the 'main-container' have no height set on the CSS divs.

 

 

Does anyone have any idea how to fix it?

 

HTML

<div id="wrapper">

<header>
</header>
	
<section id="sidebar">
</section>
    
<section id="main-container">
</section>

</div>

 

CSS

 

html, body { width:100%;height:100%; overflow:auto;}

body{
	margin:0;
	min-height:100%; 
	height:100%; 
	width:100%;
	padding:0;
	font-family: 'Open Sans', sans-serif;
	color:#484848;
	overflow-y:scroll;
}

#wrapper{
	width:100%;
	height:100%;
	min-height:100%;
	position:relative;
	margin:0;
}

header{
	width:100%;
	height:10%;
	min-height:80px;
	position:relative;
}

#sidebar{
	display: inline-block;
	width:20%;
	min-width:170px;
	height:90%;
	min-height:90%;
	position:relative;
}

#main-container{
	display: inline-block;
	margin-left:1px;
	width:78%;
	height:90%;
	margin-right:0.5%;
	vertical-align:top;
	position:relative;
}

 

Remove min-height.. add these values in #sidebar.

 

#sidebar{overflow: hidden; height: 100%; padding: 0; position: absolute; left: 0; top: 0;}

 

Let me know, your issue resolved? If not, It would be better to share live URL of your page so can help you easily..

 

Thanks

Do you still need help with this? I looked at the link you posted and the sidebar now reaches the bottom if the viewport, so I assume you got it sorted?

It would be easier if you posted a link to your site. Sometimes it's easier to find a problem if you can see the design in action. Do you still need help with this anyway though?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.