Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
[split from] Getting <div> to stretch 100% height HELP!
Old 11-11-2008, 04:20 AM [split from] Getting <div> to stretch 100% height HELP!
Junior Talker

Posts: 3
Name: Charles
Trades: 0
Hi all,

I'm the next person to fall victim to this height dilemma.

I am moving a current CMS that was based in Asp .Net 1.1 to a 3.5 framework.

In doing this i am trying to get as many standards as possible crammed in. One of the first being the a div only design.

I have looked around and tried examples but my problem is that the template i am using is slightly different from most. So every time i get one step closer i some how take one step back in regard to something else.

I was wondering if someone could possibly give some insight to my basic HTML layout below I am testing with. The layout i am looking for is where the LeftNavigation and the Content will stretch to fill the body, but also if the content is more than 1 page both will stretch over the page.
HTML Code:
<!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 runat="server">
    <title>Div Test</title>
    
    <style type="text/css">
        html
        {
            margin: 0 0 0 0;
            font-family:Arial;
            font-size: 9pt;
            overflow:hidden;
            height:100%;
        }
        
        body
        {
            margin: 0 0 0 0;
            padding: 0;
            font-family:Arial;
            font-size: 9pt;
            overflow:auto;
            background-color:Green;
            height:100%;
        }  
        
        #pnlHeader
        {
            background:#cae4ff; 
            height:73px;
        }
        
        #pnlTopNavigation
        {
            background-color:#A33232; 
            height:20px;
        }
        
        #pnlLeftNavigation
        {
            background-color:#d2d2d5; 
            margin: 0 0 0 0;
            float:left; 
            width: 200px;
            /*min-height: 503px;
            height:100%;*/
        }
        
        #pnlBreadcrumbs
        {
            background-color:#69a1bf; 
            margin-left: 200px;
            height:30px;
        }
        
        #pnlContent
        {            
            background-color:#ceedfa; 
            margin-left: 200px;
            /*min-height:433px;*/     
        }
        
        #pnlFooter
        {
            background-color:#00ffff; 
            height:40px;
            margin-left: 200px;
        }              
    </style>
    
</head>
<body>    
    <div style="border: solid 1px pink; min-height:100%">
        <div id="pnlHeader">Header</div>
        <div id="pnlTopNavigation">Top Navigation</div>    
        <div id="pnlLeftNavigation">Left Navigation</div>  
        <div id="pnlBreadcrumbs">Breadcrumbs</div>
        <div id="pnlContent">Content<br />
            a<br />
            b<br />
            c<br />
            d<br />
            e<br />         
            c<br />
            d<br />
            e<br />
            e<br />
            a<br />
            c<br />
            d<br />
            e<br />
            e<br />
            a<br />
            b<br />
            d<br />
            d<br />
            e<br />
            e<br />
            a<br />
            b<br />
            d<br />
            e<br />         
            c<br />
            d<br />
            e<br />
            e<br />            
            c<br />
            d<br />
            e<br />
            </div>
        <div id="pnlFooter">Footer</div>
    </div>
    
</body>
</html>

Last edited by Charles42; 11-11-2008 at 04:23 AM.. Reason: Template explanation
Charles42 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-11-2008, 02:42 PM Re: [split from] Getting <div> to stretch 100% height HELP!
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Don't kill yourself - try the faux columns method instead:
http://www.alistapart.com/articles/fauxcolumns/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-11-2008, 06:44 PM Re: [split from] Getting <div> to stretch 100% height HELP!
Average Talker

Posts: 29
Name: Dave
Trades: 0
Yes, use the faux columns method. I tried for hours on end to get it to work otherwise...never succeeded. The faux columns method was the only way I achieved it.
davie_gravy is offline
Reply With Quote
View Public Profile
 
Old 11-13-2008, 08:01 AM Re: [split from] Getting <div> to stretch 100% height HELP!
Junior Talker

Posts: 3
Name: Charles
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Don't kill yourself - try the faux columns method instead:
http://www.alistapart.com/articles/fauxcolumns/
Hi.

I gave this a go before i posted, obviously I rushed it and missed something.

I have tried it again and almost got the desired result. Only thing left is getting the footer aligning to the bottom of the page regardless of container div's height.

Will get it sorted though, thanks for your help! Great forum this!
Charles42 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to [split from] Getting <div> to stretch 100% height HELP!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22232 seconds with 12 queries