cyphix
11-16-2009, 01:20 PM
Hey guys.... I know CSS pretty well but have never really coded a full layout before.. so I am starting to learn how to do that...... however I am having some problems..... the divs don't seem to want to display inline; I have even tried changing them to spans & messing around with floats & still no joy. :(
Here is my code..
<!-- Start Container -->
<div id="container">
<div id="lside"><img src="images/spacer.gif" width="56" /></div>
<!-- Start Main -->
<div id="main">
<div id="header">
<img name="header" src="images/header.jpg" width="783" height="110" border="0" usemap="#header_map">
<map name="header_map">
<area shape="rect" coords="635,4,690,21" href="index.php" alt="Home">
<area shape="rect" coords="694,4,773,21" href="pages/contact.php" alt="Contact Us">
</map>
</div>
</div>
<!-- End Main -->
<div id="rside"><img src="images/spacer.gif" width="55" /></div>
</div>
<!-- End Container -->
Here is the CSS..
body {
margin: 0px 0px 0px 0px;
background-color: #E4E1D8;
}
#container {
margin: 0px auto;
width: 900px;
}
#container #lside {
width: 56px;
height: 110px;
display: inline;
background-color: white;
background-image: url(images/bg-ls.jpg);
}
#container #rside {
width: 55px;
margin-left: 845px;
height: 110px;
display: inline;
background-image: url(images/bg-rs.jpg);
}
#container #main {
width: 789px;
margin-left: 57px;
display: inline;
vertical-align: top;
background-color: #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
}
#container #main #header {
margin: 0px auto;
width: 783px;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
}
Thanks a lot guys!
Here is my code..
<!-- Start Container -->
<div id="container">
<div id="lside"><img src="images/spacer.gif" width="56" /></div>
<!-- Start Main -->
<div id="main">
<div id="header">
<img name="header" src="images/header.jpg" width="783" height="110" border="0" usemap="#header_map">
<map name="header_map">
<area shape="rect" coords="635,4,690,21" href="index.php" alt="Home">
<area shape="rect" coords="694,4,773,21" href="pages/contact.php" alt="Contact Us">
</map>
</div>
</div>
<!-- End Main -->
<div id="rside"><img src="images/spacer.gif" width="55" /></div>
</div>
<!-- End Container -->
Here is the CSS..
body {
margin: 0px 0px 0px 0px;
background-color: #E4E1D8;
}
#container {
margin: 0px auto;
width: 900px;
}
#container #lside {
width: 56px;
height: 110px;
display: inline;
background-color: white;
background-image: url(images/bg-ls.jpg);
}
#container #rside {
width: 55px;
margin-left: 845px;
height: 110px;
display: inline;
background-image: url(images/bg-rs.jpg);
}
#container #main {
width: 789px;
margin-left: 57px;
display: inline;
vertical-align: top;
background-color: #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
}
#container #main #header {
margin: 0px auto;
width: 783px;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #000;
}
Thanks a lot guys!