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)
-   -   Category Description image not displaying properly (https://forum.x-cart.com/showthread.php?t=50365)

Hyperdelicious 10-25-2009 03:44 PM

Category Description image not displaying properly
 
Using x-cart 4.2.1 with DIV layout... my problem is regarding images in category descriptions... when I add an image to the category description the image seems to float outside the description area... the image falls into the product list area... pushing product info (thumbnails, desc, price, ect.) to the left... I tried editing subcategories.tpl

Code:

  {if $current_category.description ne ""}
  <div id="subcat-desc" style="display:block;"><p class="subcategory-descr">{$current_category.description}</p></div>
  {/if}


...without luck... any ideas?


also noticed... editing .subcategory-descr in main.css does not effect the <p> layout at all... however... variables set when embedding style="" to <p> in the template show up... ???... any ideas? perhaps the css is called from another file???

JWait 10-25-2009 06:51 PM

Re: Category Description image not displaying properly
 
What skin are you using? Different skins use different stylesheets.

Hyperdelicious 10-27-2009 06:05 AM

Re: Category Description image not displaying properly
 
don't recall which skin I installed... it was an orange one with a header, nav column, and main content area... is there a way to check?

JWait 10-27-2009 07:30 AM

Re: Category Description image not displaying properly
 
OK, that is "light and lucid". If it is/was 3 columns your stylesheet is main.css. If it is 2 columns then you also will have a stylesheet named altskin.css. In addition, there are stylesheets for the various web browsers out there, but usually these don't need to be messed with (but still be aware of them).

The bit of code you posted does not look like it is from the original file as it has "style="display:block;" as part of the .tpl instead of adding it to the "subcat-desc" style in the stylesheet. Anyway, look for the style associated with what you are working on in main.css (and altskin.css if you are using it as well). Sometimes it takes a little digging, but it is much better than altering the .tpl.

amy2203 10-27-2009 07:54 AM

Re: Category Description image not displaying properly
 
firebug will help you see which styles are applying to any element on the page, and in which files they are in,

Hyperdelicious 10-27-2009 11:59 AM

Re: Category Description image not displaying properly
 
Quote:

The bit of code you posted does not look like it is from the original file as it has "style="display:block;" as part of the .tpl instead of adding it to the "subcat-desc" style in the stylesheet.

I added the DIV w/id=subcat... I was attempting to encapsulate the P tag that holds $current_category.description (the category description)... hoping to contain the description and image(s) inside a block style DIV... without luck.

Quote:

Anyway, look for the style associated with what you are working on in main.css

I have located main.css... and tried applying my changes there to class .subcategory-descr... again without luck.

Could the issue be related to the use of a WYSIWYG text editor... I checked the source code and there seems to be an extra code in there and the image is defined as input???
Here's a sample of what the browsers page source is displaying:

Code:

<p class="subcategory-descr"></p><p>
        <input alt="Bike " src="http://www.mybikesite.com/en/files/header-pics/road-bikes.jpg" type="image" vspace="8" width="225" align="left" height="201" hspace="8">Road bike plays to your strengths whether you▓re a short-run sprinter, a climbing specialist or a long-haul time trialist. If road racing is your game, you won▓t find anything better for all-around speed than our road bikes.</p>


note: the category description wasn't even placed inside the designated paragraph tag???


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

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