X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   float:left image on product detail (https://forum.x-cart.com/showthread.php?t=10484)

pinnacle 11-20-2004 05:19 AM

float:left image on product detail
 
Has anyone had success with breaking the product image out of the seperate table cell and float:left so that the description flows around it? I have set it up to do so and the text wraps fine but if I use css to color a background or have a border those appear behind the image.

Here is an example: http://www.adaappliances.com/product.php?productid=16135&cat=0&page=1

And another: http://www.adaappliances.com/product.php?productid=16156&cat=0&page=1

Code snippet of the product_thumbnail.tpl

Code:

<p style="float:left; margin:0px, 12px, 12px, 0px; padding:0px, 10px, 0px, 0px;">{* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *}
  {if $config.Appearance.show_thumbnails eq "Y"}
  [img]{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}[/img]{/if}
</p>


I can specify a margin-left in the description html or use tables but this is tedious and has some adverse effects. I was hoping there was something that could be done on the template to compensate.

The site is not live so please do not attempt to order anything!

pinnacle 11-22-2004 04:54 AM

Workaraound
 
OK I gave up on making that work. I just contained everything in a table with a non-specified width for the ones next to the image and 100% width on the lower tables. I was hoping someone had a solution but I have a deadline to meet :!:

mikebo 11-25-2004 06:58 AM

Hi Pinnacle

Try taking the floatleft out of your

tag and putting it in your <img> tag.

<IMG style="float: left; margin: .2em; border: .4em; border-color: ffe;" id="{$id}" src="{if $tmbn_url}{$tmbn_url ............

I did not try this but hope it helps you out.

jmell 11-27-2004 05:57 PM

If that works please post.
 
I've been wanting that on my site. If it works please post the code. :lol:


All times are GMT -8. The time now is 12:42 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.