Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3495038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:04:42+00:00 2026-05-18T12:04:42+00:00

I’ve been banging my head off this for nearly 3days now. I’ve read loads

  • 0

I’ve been banging my head off this for nearly 3days now. I’ve read loads of articles about 3col stretch, and seting clear and using position absolute and relative (many contradictory)

I want, what I consider, a very simple lay out. I want a navigation div on the left. Two divs on the left and a footer. If i was using tables it would be something like this:

<table border="1">
<tr> 
    <td rowspan="2">
        left nav.
    </td>
    <td>right 1</td>
</tr>
<tr>
    <td>right 2</td>
</tr>
<tr>
    <td colspan="2">footer</td>
</tr>

However I can’t get the left div to stretch all the way down. Below is the closest I’ve come to a solution. Which actually seems to work in ie7 but not in opera or firefox.

I believe this is caused by the float not expanding the length of the parent div, so the left div thinks it’s parent is smaller than it is.

Any help would be great.

    <html>
<head>
<style type="text/css">
body
{
height:100;
}



.main{
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    position: absolute;
    width: 100%;
}


.leftDiv
{

    position: relative;
    float: left;
    width: 18%;
    height: 100%;
    background-color: aqua;
}

.topRight
{
    position: relative;
    float: right;
    width: 80%;
    background-color: green;
}
.bottomRight
{
    position: relative;
    float: right;
    width: 80%;
    background-color: red;
}

.footer
{
    width: 100%;
    float: right;
    background: blue;
    position: relative;
}

</style>
</head>

<body>

<div class="main">

    <div class="leftDiv">This should Stretch all the way down the left side</div>
    <div class="topRight">This should be over to the right at the top</div>
    <div class="bottomRight">This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>This should be at the bottom right this is where the main content will go<br/>
lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>
lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>
lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>
lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>lotst of text here<br/>
lotst of text here<br/> </div>

    <div class="footer">footer text.  This should be at the bottom of the screen under the main content.<br/></div>




</div>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:04:42+00:00Added an answer on May 18, 2026 at 12:04 pm

    I took the freedom of cleaning it up a bit. I also put your footer div outside of your main div.

    In this layout the content of the main div determines the height. I gave all the content a left margin of 20% and absolute positioned the left div over this margin. Since the main div is also the parent of the left div, setting the height of the left div to 100% makes it stretch to the height of the main div (Which in its place had the height of the content).

    Another (somewhat cleaner) option would be to set the bottom: 0px in stead of the height: 100% on the left div. It would align the bottom to the bottom of the container (main div) but I think that doesn’t work in ie6.

    .topRight, .bottomRight {
        margin: 0px 0px 0px 20%;
    }
    
    .main {
        height: 100%;
        position: relative;
    }
    
    
    .leftDiv {        
        position: absolute;
        left: 0px;
        top: 0px;
        width: 18%;
        bottom: 0px;
        background-color: aqua;
    }
    
    .topRight {
        background-color: green;
    }
    
    .bottomRight {
        background-color: red;
    }
    
    .footer {
        background: blue;
    }
    

    http://jsfiddle.net/Z44HK/

    PS: I hope these </br> tags are only used for testing because they look real ugly. CSS was invented to eliminate these kind of presentational tags out of html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.