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)
-   -   Product Details Width Question (https://forum.x-cart.com/showthread.php?t=44953)

GreatLakesVacuum 01-20-2009 12:31 PM

Product Details Width Question
 
Hello all,

I am adjusting my product pages to use 480px wide images and I have everything right except one part...

From firebug when I am on the product page, and highlight this line:

<div class="details" style="margin-left: 480px;">

Then in the style tab on the right the first thing listed is:

element.style {margin-left: 480px;}

I can change this to 500 and it fixes it PERFECT in firebug, but I can't find that in main.css at all and it is not telling me the file and line to the right like it does for everything else in firebug :(

gb2world 01-20-2009 01:54 PM

Re: Product Details Width Question
 
That is an inline style - so likely will be found in a template file. You can use webmaster mode to find it. When you edit the template - if you want - you can make it a class and move it to your css file.

GreatLakesVacuum 01-21-2009 04:23 AM

Re: Product Details Width Question
 
Quote:

Originally Posted by gb2world
That is an inline style - so likely will be found in a template file. You can use webmaster mode to find it. When you edit the template - if you want - you can make it a class and move it to your css file.


Thank you for the reply. I was starting to think that myself, but I have been through every .tpl file I can find. What file controls the "details" on the product pages????

HELP :(

Why would they randomly use an inline style in the first place, doesn't that defeat the whole purpose of having this 3000 line long main.css file?

GreatLakesVacuum 01-21-2009 04:33 AM

Re: Product Details Width Question
 
I got it.... I figured out what they did... ugh... there was no margin-left: 480px ... it was calculating the 480 based on the size of the image ... probably to keep it so that the text was supposedly in the right place, even though by default the div's were overlapping (but that was after I put 480px wide images in)

So I found this:
Code:

<div class="details"{if $det_image_box_width gt 0 || $config.Appearance.image_width gt 0 || $product.image_x gt 0} style="margin-left: {$det_image_box_width|default:$config.Appearance.image_width|default:$product.image_x}px;"{/if}>

And simply ripped the Smarty statement out and hardcoded my new margin in the template like this:

Code:

<div class="details"{if $det_image_box_width gt 0 || $config.Appearance.image_width gt 0 || $product.image_x gt 0} style="margin-left: 500px;"{/if}>

I know that probably isn't the best way to do it, but it worked!

ARW VISIONS 01-21-2009 09:50 AM

Re: Product Details Width Question
 
whatever works works.

GreatLakesVacuum 01-21-2009 10:02 AM

Re: Product Details Width Question
 
Thanks Ashley :) I felt like I might have been cheating, but I suppose you are right, the ends justify the means! :)


All times are GMT -8. The time now is 03:38 PM.

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