Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to make mainwrapper height 100%?

How to make mainwrapper height 100%?

Locked

Views: 3,016

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
7 Feb 2008, 11:41 PM
#1
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

How to make mainwrapper height 100%?

It's really bugging me that on short pages, the mainwrapper height isn't 100%. I've tried adding height: 100%; to the mainwrapper in the stylesheet but it doesn't do anything.

Here's one of my short pages so you can see what I'm talking about: http://gleefulthings.com/shop/index.php?main_page=page&id=3

I just want the footer to touch the bottom of the page leaving blank white space in the middle.

8 Feb 2008, 1:57 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to make mainwrapper height 100%?

It is 100% of the content that is there

8 Feb 2008, 3:06 AM
#3
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

But I want it to be 100% the height of the window. Maybe it's not the mainwrapper I should be editing? I'm not really sure. It just bugs me that my short pages aren't touching the bottom.

8 Feb 2008, 3:20 AM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: How to make mainwrapper height 100%?

julieoolie:

But I want it to be 100% the height of the window. Maybe it's not the mainwrapper I should be editing? I'm not really sure. It just bugs me that my short pages aren't touching the bottom.

The content of a page is built dynamically, therefore the height of a page will be 100% of the content that is available to fill the page.

8 Feb 2008, 4:08 AM
#5
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

So there's really no way to do it? :(

This is gonna drive me crazy lol! I swear I've seen other zen cart sites with short pages that touch the bottom. Maybe I'm crazy though.

8 Feb 2008, 4:11 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to make mainwrapper height 100%?

But I want it to be 100% the height of the window.
And how will you know how big user "A"'s window is versus user "B"'s??

8 Feb 2008, 4:14 AM
#7
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

I don't know. That's why I was using % rather than pixels.

I'm sure it'll look fine to anyone with a small monitor but to people like myself with larger monitors, it just looks wierd to have all that blank background space at the botom.

8 Feb 2008, 4:19 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to make mainwrapper height 100%?

Not everyone opens their browsers at full screen

8 Feb 2008, 4:20 AM
#9
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

But those of us who do will see the space :shocking:

8 Feb 2008, 4:28 AM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to make mainwrapper height 100%?

Add another side box or 2

Or add a bunch of links

You are pining about what an empty representation appears when you should be populating this a start selling

8 Feb 2008, 4:45 AM
#11
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

There's pages that won't be very tall even when I have all my content in them.

And I'm not "pining" :P

9 Feb 2008, 3:03 AM
#13
predmond avatar

predmond

New Zenner

Join Date:
Apr 2007
Posts:
36
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

You could add some < br /> tags to the bottom of the page, but that would result in the page always being longer than it should be.
Could probably use javascript to detect the users screensize, and dynamically change it, but that wouldn't work if javascript is disabled.

Don't worry too much - the site looks OK the way it is!!!

9 Feb 2008, 8:39 PM
#14
julieoolie avatar

julieoolie

Zen Follower

Join Date:
Jul 2006
Location:
Southern California
Posts:
109
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

Thanks you guys :)

yellow, I tried to figure it out from the link you gave but it doesn't totally make since to me. I made the mainwrapper min-height:100%; and the body height: 100%; But I'm not getting any results from it.

16 Oct 2008, 5:32 PM
#15
yelow avatar

yelow

Zen Follower

Join Date:
Sep 2008
Posts:
115
Plugin Contributions:
0

Re: How to make mainwrapper height 100%?

I was just actually looking for the same issue, and I've (kinda) solved it but not to my liking, however maybe it'll work for you:

in stylesheet:
html {height: 100%;}
body {height: 100%;}
#mainWrapper {height: 100%}

either create those tags at the bottom of the style or add them in where they already reside.

And to all those that suggest adding side boxes and line breaks to make the page 'taller', it will still have a margin at the bottom!

-Tim

17 Jun 2011, 3:46 PM
#16
gwhitcoe avatar

gwhitcoe

New Zenner

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

Re: How to make mainwrapper height 100%?

There were four places that worked for me:

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