Jump to content

Product Display Issue


Recommended Posts

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&amp;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&amp;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.

Link to comment
Share on other sites

Good point re the float: center :ninja:

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.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...