Can someone show me an example of 3 column fluid CSS stylesheet?

Discussion in 'CSS' started by IanT, May 20, 2011.

  1. #1
    Im trying to make a fluid 3 column site that looks like this:

    I can handle the ads placement etc..

    but how do i get something that looks like the photo below and is fluid in design (i assume using percentages for width but i just dont know how to structure, whether to use floats or something else... i dont want to do faux columns as i think they are a pita...

    [​IMG]



    would it be something like this:

    
    /* null margins and padding to give good cross-browser baseline */
    html,body,address,blockquote,div,
    form,fieldset,caption,
    h1,h2,h3,h4,h5,h6,
    hr,ul,li,ol,ul,
    table,tr,td,th,p,img {
    	margin:0;
    	padding:0;
    }
    
    img,fieldset {
    	border:none;
    }
    
    hr {
    	display:none;
    }
    
    #pageWrapper {
    	width:100%;
    }
    
    #mainMenu {
    	width:100%;
    	background-color:#60d7c4;
    }
    
    
    #nav {
    
    }
    
    
    #contentWrapper {
    	width:100%;
    }
    
    
    #content {
    	position:relative;	/* This fixes the IE7 overflow hidden bug */
    	clear:both;
    	background-color:#4337E0;
    	overflow:hidden;
    }
    
    
    #sideBar1 {
    	float:left;
    	width:25%;
    	background-color:#34fc7b;
    }
    
    
    #sideBar2 {
    	float:right;
    	width:25%;
    	background-color:#f35f4B;
    }
    
    
    #footer {
    	clear:both;
    	width:100%;
    	background-color:#000;
    }
    
    Code (markup):
     
    IanT, May 20, 2011 IP
  2. ApocalypseXL

    ApocalypseXL Notable Member

    Messages:
    6,095
    Likes Received:
    103
    Best Answers:
    5
    Trophy Points:
    240
    #2
    You need to add to the sidebar and content divs this :
    minimum-height:500px;
    Code (markup):
    This way your website will have a certain height even wen the main content doesn't push the divs height down . Alternatively think about matching the background of the second wrapper and the background of the sidebars , and I'd just float everything to the left . Otherwise your code looks OK at the 1st glance .
     
    ApocalypseXL, May 21, 2011 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Cash Nebula, May 27, 2011 IP