SemperFi Posted June 18, 2006 Share Posted June 18, 2006 Here is the code I am using in viewCats.tpl: <!-- BEGIN: productTable --> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <!-- BEGIN: products --> <tr> <td style="float: center; text-align: center; position:relative; width: 150px; height :150px;"><a href="index.php?act=viewProd&productId={PRODUCT_ID}" target="_self"><img src="{SRC_PROD_THUMB}" alt="{TXT_TITLE}" border="0" title="{TXT_TITLE}" /></a> <br> <a href="index.php?act=viewProd&productId={PRODUCT_ID}" target="_self" class="txtDefault"><strong>{TXT_TITLE}</strong></a> <br /> {TXT_PRICE} </td> </tr> <!-- END: products --> </table> <!-- END: productTable --> Currently it is displaying all the products as I want, but with one exception, its all in 1 column straight down the center. What I want it to do is fill from left to right. ie so there are 3 or 4 products on one row, then it flows to the next row and repeats. Any ideas? Thankyou in advance. Quote Link to comment Share on other sites More sharing options...
roban Posted June 18, 2006 Share Posted June 18, 2006 From your code: <td style="float: center; text-align: center; float: center does not exist, it's either left or right text-align: center (try left) Quote Link to comment Share on other sites More sharing options...
SemperFi Posted June 18, 2006 Author Share Posted June 18, 2006 Good point re the float: center When float: left and text-align left are used, all that does is push it over to the left, still one verticle column (with one product per row). Quote Link to comment Share on other sites More sharing options...
Robsta Posted June 18, 2006 Share Posted June 18, 2006 Good point re the float: center When float: left and text-align left are used, all that does is push it over to the left, still one verticle column (with one product per row).It's one product per row because you're repeating table rows. Change the table structure to DIVs, and you can easily do it using a float as suggested. Quote Link to comment Share on other sites More sharing options...
SemperFi Posted June 19, 2006 Author Share Posted June 19, 2006 Changed to DIV Added in some CSS All worked fine. Thankyou to you both :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.