hi guys, want to have 3 box sections side by side on a webpage... i have created a contain div with 3 child divs nested inside it..
i want to be able to center the container so that all 3 are evenly spaced out across the page.
this is what i have so far.. it all aligns to the left.
(testing it in firefox)
css is as follows
Any help would really be appreciated.. im kinda a css beginner and tryin to cope with browser inconsistencies is annoying!
i want to be able to center the container so that all 3 are evenly spaced out across the page.
this is what i have so far.. it all aligns to the left.
(testing it in firefox)
Code:
<div id="main">
<div id="leftbar"></div>
<div id="content"></div>
<div id="rightbar"></div>
</div>
css is as follows
Code:
body {
background-color:#FFFFFF;
font:Geneva, Arial, Helvetica, sans-serif;
font-size:smaller;
text-align: center;
}
#header {
width:60%;
height:80px;
border-style:solid;
border-width:1px;
border-color:#C0C0C0;
margin-top:3%;
margin-left:auto;
margin-right:auto;
margin-bottom:20px;
text-align: left;
}
#main {
width: 80%;
border: 1px solid gray;
margin: 10px;
margin-left: auto;
margin-right: auto;
padding: 10px;
}
#content {
padding: 20px;
margin-left: 0;
margin-right: 0;
background-color: gray;
}
#leftbar {
float: left;
width: 15%;
margin: 0;
margin-right: 20px;
padding: 20px;
background-color: rgb(235, 235, 235);
}
#rightbar {
float: right;
width: 15%;
margin: 0;
margin-left: 20px;
padding: 20px;
background-color: rgb(235, 235, 235);
}
Any help would really be appreciated.. im kinda a css beginner and tryin to cope with browser inconsistencies is annoying!