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

  • Home
  • SEARCH
  • 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 8187821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:41:28+00:00 2026-06-07T02:41:28+00:00

Mixing both liquid and fixed elements in my CSS layout seems troubling. I’ve tried

  • 0

Mixing both liquid and fixed elements in my CSS layout seems troubling. I’ve tried various settings, but I can’t get it just right.

I am trying to create a template where the main content is surrounded by a content on each side (top, left, right, bottom).

<div id="container">
<div id="header">k</div>
<div id="left-column"></div>
    <div id="center-column"><h1>Main Page</h1> Liquid layout trial</div>
<div id="right-column"></div>
<div id="footer"></div>
</div>​

Top bar (header) should have fixed height.
Left column should have fixed height/width
center column should float in both height/width depending on viewport and content
right column should have fixed height/width.
footer should have fixed height

Here’s my CSS:

#header{
    background-color: blue;
    height 50px;
    color: white;
    clear:both;
}

#left-column{
    background-color: green;
    width:100px;
    height:400px;
    float: left;
}

#center-column{
    background-color: yellow;
    float:left;
}

#right-column{
    background-color: red;
    float:right;
    height: 400px;
    width: 100px;
}

#footer{
    clear: both;
    height: 50px;
    background-color: pink;
}

The center-column does not seem to use it’s whole width/height as I would expect the whole area between the four "sides" to be yellow.

enter image description here

Another issue is with limiting the viewport, the right column drops below the center column
enter image description here

I also do not understand why my header needs content to be displayed. If I remove the character "K" it’s not visible.

enter image description here

I’ve got an fiddle of this example found here: http://jsfiddle.net/jasonBr81/vZDND/2/

  • 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-06-07T02:41:29+00:00Added an answer on June 7, 2026 at 2:41 am

    If you don’t care for IE7, you can go with this. You’ll gain another advantage, not only that your middle column has no fixed width:

    All columns will always have the same height.

    • you could easily add a vertical border in one container over the whole height
    • you’ll never have the floating problem you described

    CSS

    <style>
        #header {
            height:             50px;
            background-color:   blue;
            color:              white;
        }
    
        #left-column{
            display:            table-cell;    
            height:             400px;
            background-color:   green;
        }
    
        .left-column-inner {
            width:              100px;
        }
    
        #center-column {
            display:            table-cell;
            width:              100%;
            background-color:   yellow;
        }
    
        #right-column {
            display:            table-cell; 
            background-color:   red;
        }
    
        .right-column-inner {
            width:              100px;
        }
    
        #footer{
            clear: both;
            height: 50px;
            background-color: pink;
        }
    </style>
    

    HTML

    <div id="container">
        <div id="header">HEADER</div>
    
        <div id="left-column">
            <div class="left-column-inner">LEFT</div>
        </div>
        <div id="center-column">
                <h1>Main Page</h1>
                <p>
                    Liquid layout trial Liquid layout trial Liquid layout trial Liquid layout trial Liquid layout trial Liquid layout trial 
                    Liquid layout trial Liquid layout trial Liquid layout trial Liquid layout trial Liquid layout trial Liquid layout trial 
                <p>
        </div>
        <div id="right-column">
            <div class="right-column-inner">RIGHT</div>
        </div>
    
        <div id="footer">FOOTER</div>
    </div>​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched everywhere and tried mixing and matching different bits of code but
I apologise for mixing notions but my knowledge of assymmetric web service security is
I have been using SmartGWT but have run into trouble mixing SmartGWT with other
I am curious to know whether anyone out there have tried mixing node.js headless
strlen($username); Username can carry ASCII, Unicode or both. Example: Jam123 (ASCII) - 6 characters
I am new to both Python (and django) - but not to programming. I
In additive color mixing primary colors are Red, Green and Blue (RGB). Red =
I was wondering if mixing referecened and inline types is allowed in XSD, e.g.:
I am having trouble mixing c# functions with conditions in Linq-To-SQL suppose i have
In our project we're mixing xml and annotations based spring mvc security configuration. We've

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.