Dynadot โ€” .com Registration $8.99

3 column fluid layout HELP!!

Spaceship Spaceship
Watch

therise03

Established Member
Impact
0
I am having trouble.. I need to make a fluid layout for a website with 3 columns. The two outside ones need to be equal width, and the middle one is a main content area which is going to be larger in width.Below is the css code I have been using. The problem is when I minimize the site using IE the middle drops out to the bottom and leaves a large white space where it used to be, surrounded by the two outside columns. Please help!!!

p.s. what is the best method to make a 3 column fluid layout ????


#header {
background-color:#FFFFFF;
text-align: center;
}

#left {
float:left;
width:100px;
padding:0.5em;
background-color:#ffffff;
text-align: center;
}

#right {
float:right;
width:100px;
padding:0.5em;
background-color:#ffffff;
text-align: center;
}

#center {
background-color:#ffffff;
width: 75%;
padding: 0.5em;
margin-left: 100px;
margin-right: 80px;
}

#footer {

clear:both;
background-color:#CCC08F;
padding:.5em;
background-color: white;
font-size: 12px;
text-align: center;
padding-top: 30px;
}


#container {
width: 90%;
margin: 0 auto;
background-color: white;
}
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Give this a go:

http://www.nowcss.com/layouts/css-fluid-layout-tutorial

Should help :)

Try:

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">

#left {
float:left;
width:15%;
}
#right {
float:right;
width:15%;
}
#center {
margin: 0 15% 0 15%;
}
#container {
width: 90%;
margin: 0 auto;
background-color: white;
}

</style>

</head>

<body>

<div id="container">
<div id="left"></div>
<div id="right"></div>
<div id="center"></div>
</div>

</body>
</html>

Your problem might be setting a width to #center.

and the "sidebars" should be floated left and one right. The code I pasted works for me, hope it does for you :)
 
Last edited:
0
•••
thanks a million, a friend told me about this site, and how the forum support was fast and good, and i agree, it was both. I tried the CSS code you gave me and it works perfectly, cant wait to run into more questions to ask! Thanks a lot!
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back