I have a site that is two column developed in CSS. Whenever the right column gets too long it appears that the right column starts to go under the right column and then the text and images start stacking on top of each other. The background also disappears. This happens when I add a third prodcontainer and then the fourth goes off the background and over to the right further.Any help would be much appreciated.
CSS Code:
body{
margin:0;
padding:0;
}
b{font-size: 110%;}
em{color: red;}
#maincontainer{
width: 1000px;
margin: 0 auto;
/*Center container on page*/
background-image:url(../slices/bg-image.jpg);
background-repeat:repeat-y;
background-position:center;
}
#topsection{
padding-left:25px;
padding-top:0px;
margin:0;
height: 112px; /*Height of top section*/
}
#topsection h1{
margin: 0;
padding-top: 15px;
}
#contentwrapper{
float: left;
width: 100%;
background-image:url(../slices/bg-image.jpg);
background-repeat:repeat-y;
background-position:center;
}
#contentcolumn{
margin: 0 259px 0 235px; /*Margins for content column. Should be "0 RightColumnWidth 0 LeftColumnWidth*/
}
#contentcolumnpage{
margin: 0 20px 0 235px; /*Margins for content column. Should be "0 RightColumnWidth 0 LeftColumnWidth*/
}
#leftcolumn{
float: left;
width: 213px; /*Width of left column in pixel*/
margin-left: -975px; /*Set margin to that of -(MainContainerWidth)*/
}
.leftnav{
background-image: url(../slices/bkg-nav-sides.png);
background-repeat:repeat-y;
width:213px;
padding-top:0px;
margin:0;
}
.leftnav ul li{
list-style-type:none;
}
.leftnav ul li a{
text-decoration:none;
width:213px;
}
#rightcolumn{
float: left;
width: 259px; /*Width of right column*/
margin-left: -280px; /*Set left margin to -(RightColumnWidth)*/
}
#footer{
clear: left;
width: 100%;
background-image:url(../slices/footer-image.jpg);
background-repeat:repeat-y;
background-position:center;
color: #FFF;
text-align: center;
padding: 4px 0;
}
#footer a{
color: #FFFF80;
}
.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/
margin-top: 0;
}
/* define type styles */
h1 {
font:Arial, Helvetica, sans-serif;
font-size:24px;
color:#0e3263;
margin-top:3px;
}
h2 {
font:Arial, Helvetica, sans-serif;
font-size:18px;
color:#0e3263;
margin-top:3px;
}
.bluetitle {
font:Arial, Helvetica, sans-serif;
font-size:14px;
color:#0e3263;
font-weight:bold;
}
.text {
font:Arial, Helvetica, sans-serif;
font-size:12px;
}
/*define navigation elements */
.top{
background:url(../slices/header.png) top no-repeat;
height:112px;
}
.navlinks{
background-image:url(../slices/navbutton.png);
background-repeat:no-repeat;
height:32px;
margin-left:-15px;
}
.navlinks a {
font-family:Arial, Helvetica, sans-serif;
color:#00275c;
font-size:14px;
font-weight:bold;
padding-left:38px;
}
.logos {
margin-left:25px;
}
.navtop{
background-image:url(../slices/bkg-nav-top.png);
background-repeat:no-repeat;
width:213px;
height:19px;
padding:0;
margin:0;
}
.navbottom{
background-image:url(../slices/bkg-nav-bottom.png);
background-repeat:no-repeat;
width:213px;
}
.contactus {
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
font-style:italic;
color:#01204b;
}
.phone {
font:Arial, Helvetica, sans-serif;
font-size:24px;
color:#0e3263;
}
.graybar {
background-image:url(../slices/grayline.jpg);
background-repeat:no-repeat;
margin-left:18px;
}
/* Right side home page */
.adhometop{
background-image:url(../slices/ad-home-top.png);
width:259px;
height:168px;
background-repeat:no-repeat;
}
.adhomemiddle{
background-image:url(../slices/ad-home-middle.png);
width:259px;
height:174px;
background-repeat:no-repeat;
}
.adhomebottom{
background-image:url(../slices/ad-home-bottom.png);
width:263px;
height:228px;
background-repeat:no-repeat;
}
.orangetitle{
font-family:Arial, Helvetica, sans-serif;
font-size:18px;
font-weight:bold;
color:#dc6a04;
padding-left:15px;
}
.adtext{
font:Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:bold;
color:#0e3263;
padding-left:15px;
line-height:13px;
}
.adtext ul li {
list-style-position: -5px;
}
.homecontent{
font:Arial, Helvetica, sans-serif;
font-size:12px;
padding:10px;
}
/* product page*/
#prodcontainer{
width:666px;
margin:0 auto;
padding: 10px;
background-image:url(../slices/item-bkg.png);
background-repeat:no-repeat;
height:173px;
}
#prodmain{
width:auto;
display:block;
padding:10px;
}
#productimage
{
width:100px;
margin-right:25px;
float:left;
}
#producttext
{
width:350px;
margin-right:25px;
float:left;
}
#productprice
{
width:100px;
float:left;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#01204b;
padding-left:5px;
}
.productnumber {
font-family:Arial, Helvetica, sans-serif;
font-size:48px;
color:#01204b;
}
.productnumbersmall{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#01204b;
}
.orangetitlelg {
font-family:Arial, Helvetica, sans-serif;
font-size:24px;
font-weight:bold;
color:#dc6a04;
}
#
.clear
{clear:both;}
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled</title>
</head>
<link rel="stylesheet" href="styles/main.css" type="text/css">
<body>
<div id="maincontainer">
<div id="topsection"><img src="slices/header.png"></div>
<div id="contentwrapper">
<div id="contentcolumnpage">
<div class="innertube">
<div class="homecontent"><h1>Imagine a Hotspot the Size of a City™</h1>
<p>With CLEAR™ you get internet over areas much, much larger than Wi-Fi. <br>
We’re talking miles, not feet. So, forget about finding a hotspot… connect <br>
anywhere CLEAR has coverage.* Now you’re truly mobile!</p>
<h2>CLEAR is Next Generation Mobile Broadband</h2>
<p>Powered by WiMAX, a Fourth Generation (4G) wireless technology, the
CLEAR network combines the mobility you love about your cell phone with
the speed you want from broadband.</p>
<p>That means you get the same full internet experience you get at home while on the go. So go ahead and watch videos, download music or send email… with CLEAR you can do what you want, where you want.</p>
<h2>CLEAR Gives You Choices</h2>
<p>Getting online should be easy. That’s why CLEAR gives you choices:</p>
<p> * Service for home, around town or both<br>
* Flexible plans by the day or by the month<br>
* Devices for mobile or at home use</p>
<p>Plus, there’s no drilling, digging or waiting for installation. CLEAR gives you internet the way you want it. Now that’s the way a broadband service should be!</p>
</div>
<div id="prodcontainer">
<div id="prodmain">
<div id="productbox">
<div id="productimage"><img src="images/product-home-internet.png"></div>
<div id="producttext"><span class="orangetitlelg">Fast Home Internet</span><br><br>
<span class="text">Fast Home Internet gives you more speed. This plan is ideal for online shopping, sending photos or even downloading
music. You'll connect at download speeds of 3Mbps and upload speeds of 500Kbps**. Usage is unlimited.<br><br>
$35 activation fee (waived with 2 year sign up).</span>
</div>
<div id="productprice"><span class="productnumber">$30</span>/month<br><br>
<a href="contactus.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','slices/learnmore-on.png',1)"><img src="slices/learnmore-off.png" name="Image6" width="121" height="50" border="0"></a></div>
</div>
</div>
</div>
</div>
<div id="prodcontainer">
<div id="prodmain">
<div id="productbox">
<div id="productimage"><img src="images/product-home-internet.png"></div>
<div id="producttext"><span class="orangetitlelg">Faster Home Internet</span><br><br>
<span class="text">Faster Home Internet lets you do more online in less time. This plan is ideal for playing games, banking, shopping, uploading, downloading videos and more!
You'll connect at download speeds of 6Mbps and upload speeds of 500Kbps**. Usage is unlimited.</span>
</div>
<div id="productprice"><span class="productnumber">$40</span>/month<br><br>
<a href="contactus.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','slices/learnmore-on.png',1)"><img src="slices/learnmore-off.png" name="Image6" width="121" height="50" border="0"></a></div>
</div>
</div>
</div>
</div>
<div class="clear"> </div>
</div>
</div>
<div id="leftcolumn">
<?php include('includes/navigation.php'); ?>
</div>
<div id="footer"></div>
</div>
</body>
</html>