I am new to CSS and I am having problems with my code. I have created these CSS rules and applied them to the code that follows after the rules.
My intention is to have all my divs line up in a straight line within the searchresultscontainer div. But when I check my results in the browser, none of them are positioned correctly. What am I not getting right?
.searchresultscontainer{
width:800px;
height:62px;
border-style:solid;
border-color:#FF0000;}
.searchresultsimg{
position:absolute;
width:100px;
height:60px;
background-color:#CCCCCC;
float:left;
left:0px;
border-style:solid;
border-color:#9966CC;
}
/*.searchresultsdetail{
position:relative;
width:700px;
height:61px;
text-align:center;
background-color:#CCCCCC;
float:right;
left:101px;
margin:0;
padding:0;
}*/
.productdescription{
position:absolute;
width:300px;
height:36px;
text-align:left;
float:left;
left:101px;
margin:0;
padding:10;
border-style:solid;
border-color:#FFCC00;
}
.productmodelno{
position:absolute;
width:100px;
height:36px;
text-align:left;
float:left;
left:401px;
margin:0;
padding:10;
border-style:solid;
border-color:#996600;
}
.productmodelyear{
position:absolute;
width:100px;
height:36px;
text-align:left;
float:left;
left:501px;
margin:0;
padding:10;
border-style:solid;
border-color:#00FF00;
}
.productprice{
position:absolute;
width:100px;
height:36px;
text-align:left;
float:left;
left:601px;
margin:0;
padding:10;
border-style:solid;
border-color:#000033;
}
.productuserid{
position:absolute;
width:100px;
height:36px;
text-align:left;
float:left;
left:701px;
margin:0;
padding:10;
border-style:solid;
border-color:#990000;
}
xhtml code to which CSS are applied:
<div class="searchresultscontainer">
<div class="searchresultsimg"><!--- creating a resized version of uploaded image of product --->
<cfimage source="#ExpandPath('images/consumer/#Cnsmr_ProductIMAGE#')#" action="resize" width="100" height="60" name="resizedImg" format= "jpg">
<cfimage source="#resizedImg#" action="writeToBrowser"><!---img src="images/consumer/#Cnsmr_ProductIMAGE#"--->
</div>
<div class="productdescription"><font size="+2">#Cnsmr_ProductDESCRIPTION# </font> <font size="+2"></div>
<div class="productmodelno"><a href="showProductDetail.cfm?Cnsmr_ProductCountID=#URLEncodedFormat(TRIM(Cnsmr_ ProductCountID))#">#Cnsmr_ProductMODELNo# </font> </a></div>
<div class="productmodelyear"><font size="+2">#Cnsmr_ProductMODELYEAR# </font> </div>
<div class="productprice"><font size="+2">#Cnsmr_ProductPRICE#</font> </div>
<div class="productuserid"><font color="#000066#" size="+2">#User_id#</font></div>
</div> <!--- end of searchresultscontainer --->
A would appreciate any help on how to correct this. TIA