Zen Cart Logo

100% Page Height

Locked

Views: 2,583

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
13 Oct 2009, 12:12 PM
#1
compuweb avatar

compuweb

New Zenner

Join Date:
Aug 2009
Location:
Limerick, Ireland
Posts:
91
Plugin Contributions:
0

100% Page Height

Hello,

I want to give my site a 100% page height.

In other words, for pages that do not fill the screen vertically with content I would like the page to continue and fill the screen vertically.

Any suggestions would be very much appreciated.

Current site (work in progress) - http://www.safebaby.ie

13 Oct 2009, 2:25 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: 100% Page Height

There's a thread here:

http://www.zen-cart.com/forum/showthread.php?t=104107

But I think the real answer is to balance your middle content with your sideboxes.

13 Oct 2009, 6:14 PM
#3
compuweb avatar

compuweb

New Zenner

Join Date:
Aug 2009
Location:
Limerick, Ireland
Posts:
91
Plugin Contributions:
0

Re: 100% Page Height

Thanks for your help.

I added the following to my CSS file as the above thread suggested;

html {
height:100%;
}

body {
height:100%;
}

#mainWrapper {
height:100%;
}

This does make the page 100% height as I had asked but it does not move the footer to bottom of the page.

You can see what it is doing here: http://www.safebaby.ie/

Any suggestion on how to go about having the footer at the bottom of the page ( or hug the bottom of browser window) ?

14 Oct 2009, 10:11 AM
#4
compuweb avatar

compuweb

New Zenner

Join Date:
Aug 2009
Location:
Limerick, Ireland
Posts:
91
Plugin Contributions:
0

Re: 100% Page Height

Unfortunately no seems to know how to do this, so I have had to remove the changes I made above and revert back to having the site only take up two thirds of the screen.

Having the site only take up a certain amount of the screen is ugly in my opinion and if anyone ever comes across a solution for a 100% page height for Zen Cart please let me know.

Thank for the help anyway.

14 Oct 2009, 11:07 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: 100% Page Height

How about doing what you did and moving the footer down with something like this?:

#footerhsy {margin-top:200px;}

#footerhsy doesn't exist in a stock Zencart installation. That might be why it didn't work just by using the changes in the other thread.

14 Oct 2009, 11:25 AM
#6
compuweb avatar

compuweb

New Zenner

Join Date:
Aug 2009
Location:
Limerick, Ireland
Posts:
91
Plugin Contributions:
0

Re: 100% Page Height

Hi stevesh,

Thanks once again for your suggestion.

I tried what you suggested above but it unfortunately did not work (even though I see where you were coming from).

Result of the above suggested change can be seen here: http://www.safebaby.ie/

14 Oct 2009, 12:13 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: 100% Page Height

Which looks to me like exactly what you wanted, in IE anyway. It looks like the footer doesn't go down as far in FF, but you should be able to play with px, em or % in the margin statement to make it right, I think.

17 Jun 2011, 3:47 PM
#8
gwhitcoe avatar

gwhitcoe

New Zenner

Join Date:
Jun 2011
Posts:
3
Plugin Contributions:
0

Re: 100% Page Height

There were four places that worked for me:

html {height: 100%;}
body {height: 100%;}
#mainWrapper {height: 100%}
#contentMainWrapper {height: 100%}