Chris Blown schrieb:
"whole layout relative to the viewport?"

I guess what I was aiming for was;

Sorry, I don't understand this :/ (still learning english)


When the content area contains less content than the current users
viewport, the content area will stretch to the fill out the vacant area,
pushing the footer to the base of the browser window. I got this working
no worries.


When the content area contains more content than the current users
viewport, the content overflows the div and footer, hanging off the
bottom of the page in no mans land, be nice to have the div expand with
the content. I tried various methods with little success.

A few months ago I need to do this for a project. It was one of my first pure CSS layouts. It's done with positioning not floats.


The abstract HTML:

<div id="min-height">&nbsp;</div>
<div>Content</div>
<div id="footer">Footer</div>

CSS:

#min-height {
  width: 3px;
  height: 100%;
  float: right;
  margin-bottom: -112px;
  overflow: hidden;
}
#footer {
  /* ... */
  clear: both;
  height: 112px;
}

You can see it live at
  <http://www.lentos.at/>
  <http://www.lentos.at/screen.css>

I works in IE5+ (Win and Mac) Mozilla1+ and Opera7 (in quirksmode).

PPK has written an interesting article about 100% height:
  <http://www.quirksmode.org/css/100percheight.html>

Footer Demo:
  <http://scott.sauyet.name/CSS/Demo/FooterDemo2.html>

HTH
Tonico

*****************************************************
The discussion list for http://webstandardsgroup.org/
*****************************************************




Reply via email to