Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a 3-columns fluid layout, as described by attached picture, but I cannot reach the desired results.

enter image description here

Do you have some hints that can help me?

share|improve this question
up vote 7 down vote accepted

The 2 fixed columns with 1 fill column has been referred to as "The Holy Grail" of CSS layouts.

Check out:

The example on that page is geared for fixed gutters and variable center column, but the concept is the same.

share|improve this answer
wow, that is fabulous. – Lauren Ipsum Jul 11 '11 at 15:10
It's stupidly elegant. I threw out several of my "go-to" layouts after seeing how simple his solution is... – Farray Jul 11 '11 at 15:16
Excellent site. +1 – dooburt Jul 11 '11 at 15:37
@dooburt Sweet LEGO plane. – Farray Jul 11 '11 at 16:24
Good steer, @farray. has been in my bookmarks forever. It's a fantastic resource. – Alan Gilbertson Jul 11 '11 at 19:07

The following is exactly what you need, and I think is a bit simpler than the construct. It doesn't use any positioning properties, so that leaves you free to do whatever you want. You'll have to throw in your own IE fixes, which would be the same as that one. I didn't have enough time available to get into that kind of fine tuning. This does work in current versions of IE, FF, Chrome, Safari and Opera, however.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    background: #4E5869;
    margin: 0;
    padding: 0;
    color: #000;
.wrapper {
    background: #cccccc;
    min-width: 600 px;
    margin: 0 auto;
.header {
.footer {
    background: violet;
.mainContent {
    background: #36C;
    float: left;
    margin-right: -325px;
.leftSidebar {
    width: 200px;
    background: green;
    float: right;
    overflow: visible;
.rightSidebar {
    width: 125px;
    background: red;
<title>Untitled Document</title>
<div class="wrapper">
  <div class="header"> This is header text </div>
  <div class="mainContent">
    <h1>Woo Hoo</h1>
    Here is spiffy main content </div>
  <div class="rightSidebar"> Sidebar on the right. </div>
  <div class="leftSidebar"> This is my left sidebar </div>
  <div class="footer"> This is my spiffy footer </div>
share|improve this answer
Your solution is almost perfect for my case, the only thing is that if I have a long text inside .mainContent, it goes under the sidebar columns. I am trying to find a fix. – Drake Jul 13 '11 at 11:57
Give your p tag a right margin of 350px and padding to taste. – Alan Gilbertson Jul 14 '11 at 5:58

The 960 Grid System is great for this kind of stuff. Just copy and paste the HTML code from the generator (here) into your CSS file. Then all you have to do is call classes on your divs.

<div id="" class="">
 <div id="left-side" class="grid_8">
  Left side
 <div id="right-side-1" class="grid_2">
  Right Side 1
 <div id="right-side-2" class="grid_2">
  Right Side 2
share|improve this answer

Try giving your fluid div a min-widthexpressed as a percentage. What that number is you'll have to work out (I threw one together and used 80%, but your mileage may vary).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.