Forum Moderators: not2easy
instead of putting the code here (it got messy because I cannot use tabs), please see this HTML page:
[small]<snip>[/small]
[edited by: limbo at 6:32 pm (utc) on Mar 31, 2010]
[edit reason] No URL's please, see TOS [webmasterworld.com] [/edit]
<STYLE type="text/css">
.row {margin-top: 7px; width:900px;}
.col-a, .col-b, .col-c, .col-d, .col-e {height:75px;}
.col-a {float:left; width:75px;}
.col-b {float:left; white-space:normal;}
.col-c {float:left; width:80px; padding: 0 8px 0 8px;}
.col-d {float:left; width:45px;}
.col-e {float:left; width:45px;}
#right {float:right;}
/* vertical aligns */
.col-c, .col-d, .col-e {display: table; overflow: hidden;}
.col-va {display: table-cell; vertical-align: middle;}
.clear {clear:both;}
</style>
<div class="row" style="border:1px solid red">
<div class="col-a">
<A HREF="/Product/url">
<IMG WIDTH="65" HEIGHT="75" BORDER="0" ALT="Product photo" SRC="/Product/thumbnail.jpg"></A>
</div>
<div class="col-b">
<A HREF="/Product/url"><B>Greatest Product Ever</B></A>
<div class="descrip">
This is the text where we describe the product. It can sometimes be short and simple. But it can also be rather long, like this one.
I need the CSS to deal with it.
<BR>
sometimes there are also line breaks.
</div>
<a HREF="/Product/url">View Product Details</a>
</div>
<div id="right">
<div class="col-c">
<div class="col-va">
<strike>$99.95</strike><BR>
<font color="#ff0000"><b>Sale! </b><B>$59.95</B></font>
</div>
</div>
<div class="col-d">
<div class="col-va">
<form style="MARGIN: 0px" action="/additemtocart.php?blah=blah" method="post">
<INPUT id="add1" size="1" name="add" TYPE="text" VALUE="1">
</div>
</div>
<div class="col-e">
<div class="col-va">
<INPUT TYPE=IMAGE BORDER=0 SRC="/images/buy.gif" alt="buy button">
</div>
</div>
</div><!-- close right div -->
<br class="clear">
</div>
<HR>
below is done with tables. This is how I want the CSS version above to work:<BR><BR>
<table width="100%" style="border:1px solid red">
<TR>
<td><!-- valign=top align=center width=75 -->
<A HREF="/Product/url">
<IMG WIDTH="65" HEIGHT="75" BORDER="0" ALT="Product photo" SRC="/Product/thumbnail.jpg"></A>
</td>
<td>
<A HREF="/Product/url"><B>Greatest Product Ever</B></A>
<div class="descrip">
This is the text where we describe the product. It can sometimes be short and simple. But it can also be rather long, like this one.
I need the CSS to deal with it.
<BR>
sometimes there are also line breaks.
</div>
<a HREF="/Product/url">View Product Details</a>
</td>
<td valign="middle">
<strike>$99.95</strike><BR>
<font color="#ff0000"><b>Sale! </b><B>$59.95</B></font>
</td>
<td valign="middle">
<form style="MARGIN: 0px" action="/additemtocart.php?blah=blah" method="post">
<INPUT id="add1" size="1" name="add" TYPE="text" VALUE="1">
</td>
<td valign="middle">
<INPUT TYPE=IMAGE BORDER=0 SRC="/images/buy.gif" alt="buy button">
</td>
</tr>
</table>