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.

Layout issure got me puzzled any ideas?

Featured Replies

Hey decided to stop using tables and get with the program, but have hit a hurdle thats becoming annoying.

 

My layout is basically a header middle image and the main content all within a #container, the header and middle image are fixed height and I want the content to fill the rest of the space, but can't get it to fill in what space is missing, it just runs off the bottom of the page and creates a massive content section.

 

I have made a more basic version of my page as not to confuse, blue box is header, brown is midImage, green is container and yellow is content.

 

 

My CSS Code:

body, html {
height:100%;
}

body {
margin:0px;
padding:0px;
text-align:center;
}

#container {
margin:0px auto;
padding:0px;
width:750px;
background-color:#006633;
height:auto;
min-height:100%;
height:100%;
}

#header {
margin:0px;
padding:0px;
height:165px;
background-color:#003399;
}

#midImage {
margin:8px 0 0 0;
padding:0px;
height:220px;
background-color:#993300;
}

#content {
width:750px;
margin:8px 0 0 0;
padding:0px;
background-color:#CCCC00;
height:100%;
}

 

 

My HTML Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="test.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="container">

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

</div>
</body>
</html>

 

 

Here is a live link to show what it is doing as you can see the yellow box is going off the screen at the bottom instead of just filling the rest of the page up.

 

http://www.creativgroup.com/cpartnership/n...esttemplate.htm

 

I have also attached a jpg to show you how I intend it to look.

 

Any help would be fantastic, I have searched the web and many forums but so far have not come up with a solution?

 

post-2127-1191496002_thumb.jpg

with the standard box model, when you put "height: 100%", it actually means "height = full browser window height", rather than just "remaining pixels above the fold".

 

If you want to do just to the bottom of the scroll area, do sometihng like:

 

"position: relative; bottom: 0;"

  • Author

I have changed the #content to

 

#content {
position:relative;
bottom:0px;
width:750px;
margin:8px 0 0 0;
padding:0px;
background-color:#CCCC55;
}

 

but that does not set the height of the box it just sends it to the bottom and I have to define the height still.

  • Author

Tell a lie that has not worked its 100% off the browser window but if content goes out the bottom the container will not go with it.

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.