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.

css div height

Featured Replies

can't get my div to stretch around my content

 

css

* html { height:100%; }
body {
font-size:14.5px;
font-family:tahoma, verdana, arial;
color:#333;
line-height:16px;
margin:0;
padding:0;
height:100%;
}
/* wrapper */
#wrapper {
width:900px;
position:absolute;
top:20px;
left:310px;
background:#eee;
height:inherit;
/* curve corners */
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border: 1px solid #0C3B7F;
}

 

image is added

You don't show all your code so I'm guessing. The wrapper seems to be going down to the bottom of the right sidebar under item 4 so this may be part of the problem or is it just that the wrapper was height: 100% but the bottom has risen with the scrollbar?.

 

Also your wrapper has position: absolute; and height: inherit; but does inherit work with an absolute position? Try deleting height: inherit; and add a full width empty div without a float under the left and right divs inside wrapper if the content and sidebar are both floated. This may drag the wrapper height down to the unfloated div.

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.