Wrapper height (CSS issue)

Use this forum to make posts not related to PivotX. Do you use a tool that someone else might like or need to test something like your signature or some bbcode? This is the right place for you! Spamming will not be tolerated.

Wrapper height (CSS issue)

Postby Tinycat » Tue Jun 22, 2010 3:36 pm

Hello everyone,

I'm building my first real PivotX site, but I'm experiencing some troubles...

I would like my wrapper to have the height of the screen, so it's always from top to bottom.

At first I had this:

Code: Select all
#wrapper {
   margin: 0 auto 0px auto;
   width: 800px;
        height: 100%;
   background: url(images/black.jpg);
   }


This didn't work, and I found out this was due to the fact that the wrapper is as high as its content. So therefor I changed it to:

Code: Select all
html, body, #wrapper {
      height: 100%;
      margin: 0;
      padding: 0;
      border: none;
      text-align: center;
   }

#wrapper {
   margin: 0 auto 0px auto;
   width: 800px;
   background: url(images/black.jpg);
}


This seemed to be working for the regular pages, but not at the weblog. At the weblog, the background of the body stops halfway, and doesn't expands to the bottom. You can see it at http://www.raptorboas.com

Does anyone knows the solution to this problem? I could give the #wrapper a defined height (like this: height: 2300px; for example), but this would imply that shorter pages will have their body extend a long way down after the text has already finished. And it means that in case I have a longer page, I will always have to adjust height. Not the best solution too...

Hopefully you can help me out! I'm a newby and have a lot to learn!

Greets,
Tinycat
Tinycat
 
Posts: 14
Joined: Mon Jun 21, 2010 6:21 am

Re: Wrapper height (CSS issue)

Postby rabbeltje » Wed Jun 23, 2010 7:35 am

why don't you assign the background to the body, this way it's always bottom to top. you can still define the width in the wrapper-div but you won't have the problem you mentioned.
User avatar
rabbeltje
 
Posts: 358
Joined: Mon Aug 25, 2008 11:54 am
Location: Neerbeek, The Netherlands


Return to The Drain

Who is online

Users browsing this forum: No registered users and 1 guest

cron