Have whole site height to 100%?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Pudekamp
Posts: 9
Joined: Sat 29. Dec 2007, 10:14

Have whole site height to 100%?

Post by Pudekamp »

In ealier versions of phpwcms I have used this CSS in standard CSS:

Code: Select all

.100hoej {
height: 75%; 
}
and then added 100hoej in layouts to all blocks, and that would make the bottom of the site go completely to the bottom of the screen, but now it does not - has anything been changed, so I need to do it different in the new version?

Thanks in advance.

Best regards,

Thomas Petersen
daniel.grant
Posts: 97
Joined: Thu 2. Nov 2006, 15:42
Location: London

Re: Have whole site height to 100%?

Post by daniel.grant »

This issue is a CSS one (not phpwcms).

You could try doing this

html, body {
height: 100%;
}

#container { /* The div you want to stretch to the bottom of the screen */
min-height: 100% /* cos you actually need min-height for long pages */
}

* html #container {
height:100% /* for IE6 which doesn't understand min-height */
}
User avatar
cyppher.nl
Posts: 138
Joined: Wed 19. May 2004, 18:38
Location: Hilversum, Netherlands

Re: Have whole site height to 100%?

Post by cyppher.nl »

Hi,
it's actually not possible to set a container 100% height by CSS, at least not in standards mode (W3C valid html).
Solution is going back to webdesign from the 90's, using tables to layout a page and leaving the doctype declaration.
The <table> tag has an attribute height, which you can set to 100%.

I've had this design issue several times to solve, I wonder why you'd want to have a 100% height container in the body. Adding a footer to the absolute bottom of your page is done by absolute positioning the footer in a relative (0) positioned container (position: relative;).

Good luck.
How do you do? And how do you do your wife?
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: Have whole site height to 100%?

Post by DeXXus »

100% Height Layout Using CSS
http://www.dave-woods.co.uk/?p=144
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: Have whole site height to 100%?

Post by Jensensen »

[x]
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Post Reply