Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...CSS Skinning.... 100% height?CSS Skinning.... 100% height?
Previous
 
Next
New Post
7/29/2008 6:45 AM
 

As i mentioned in my previous post > 'Then the only way to make divs stack properly in a 100% frame is to have *ALL* the div's total 100%'

so if you put these values in
    .head
     {
         height:20%;
         background-color:red; 
     }
     .content
     {
         background-color:blue;
         padding-top:0;
         padding-bottom:0;
        height:70%;
     }
     .footer
     {
         position:absolute;
         bottom:0;
         left:0;
         width:100%;
         height:10%;
         background-color:green;
     }

you get the content area filled.

The Fixed height header and footer is harder (obviously).......

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <style type="text/css">
    html, body {
        height:100%;
     }
     .pagewrap
     {
         position:relative;
         width:800px;
         margin:0 auto;
         height:100%;
     }
     .head
     {
         position:absolute;
         top:0px;
         left:0;
         width:100%;
         height:100px;
         background-color:red; 
     }
     .content
     {
        float:left;
        width:100%;
        background-color:blue;
        padding-bottom:0;
        margin-top:100px;
        height:100%;
     }
 
     .footer
     {
         position:absolute;
         bottom:-150px;
         left:0;
         width:100%;
         height:50px;
         background-color:green;
     }
    </style>
</head>
<body>
<div class="pagewrap" >
    <div class="head">header</div>
    <div class="content" >
         content
            yada
            <br/>
            yada
            <br/>
            yada
            <br/>
            yada
            <br/>
    </div>
    <div class="footer">footer</div>
</div>
</body>
</html>

The critcal component here is to float the content pane as this makes the margin-top behave as you might expect it to!

 
New Post
7/29/2008 1:16 PM
 

I understand what you're saying. However it looks like I'm not going to be able to fill the content area 100% and have the footer at the bottom like I would like too if using xhtml1-transitional.dtd. In every example I've looked at, tried, etc. as soon as you put a 100% height into the content area it literally takes 100% of the browser height and not 100% of what's available to it which means the footer gets pushed off the bottom of the page.

 
New Post
7/29/2008 2:54 PM
 

Mike,

I have realized a 100% height with a fixed footer, which only gets pushed down if the content is bigger. To realize this you need to style differently for IE and FF.

You can take a look at the site here: http://www.allesoversubsidie.nl/contact/tabid/57/Default.aspx

The css is a bit messy owing to all the changes and module specifics, but when you use firebug/webdeveloper in FF, you should be able the figure out the bigger picture.

Good luck.

Peter


Peter Schotman
Cestus Websites voor DotNetNuke oplossingen in Nederland
Contact us for your custom design and skinning work.
 
New Post
8/4/2008 10:27 AM
 

Mike,
        Appologies for previous posting, i had clearly given the impression that the page i posted worked.... i didn't!  Not sure what got into me!

This does however! Tested in IE 6, 7 Firefox 3, Opera and Safari!

In the end the solution is quite simple... the crutial components are; Float the content pane (height:100%), Place the header inside the content pane and float, this way content will sit underneath the header in natural page flow without the need for margins or padding (thereby not disrupting the 100% calculations made by the browser). The footer is attached to the frame as position absolute. Last but not least overflow:hidden must be set on the content pane to prevent content pushing underneath the footer.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
    <style type="text/css">
        *
        {
            padding:0px;
            margin:0px;
        }
    html, body {
        height:100%;
     }
     .pagewrap
     {
         position:relative;
         width:800px;
         margin:0 auto;
         height:100%;
     }
     .head
     {
        float:left;
         width:100%;
         height:100px;
         background-color:red; 
     }
     .content
     {
        float:left;
        width:100%;
        background-color:blue;
        height:100%;
        overflow:hidden;
     }
     .footer
     {
       position:absolute;
       left:0;
       bottom:0;
       width:100%;
       height:50px;
       background-color:green;
     }
    </style>
</head>
<body>
<div class="pagewrap" >
 
    <div class="content" >
      <div class="head">header</div>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
            <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>yada <br/>
     
             <div class="footer">footer</div>
    </div>
  
   
</div>
</body>
</html>

 

 
New Post
8/4/2008 2:05 PM
 

I'll give that a look Matthew. Thanks

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...CSS Skinning.... 100% height?CSS Skinning.... 100% height?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out