Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Product Details Width Question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-20-2009, 12:31 PM
 
GreatLakesVacuum GreatLakesVacuum is offline
 

eXpert
  
Join Date: Jan 2009
Posts: 286
 

Default 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
__________________
X-Cart 4.5.4 Gold (Live Business Site)
X-Cart 5.1.9 Business (In Development Now)
Reply With Quote
  #2  
Old 01-20-2009, 01:54 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #3  
Old 01-21-2009, 04:23 AM
 
GreatLakesVacuum GreatLakesVacuum is offline
 

eXpert
  
Join Date: Jan 2009
Posts: 286
 

Default 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?
__________________
X-Cart 4.5.4 Gold (Live Business Site)
X-Cart 5.1.9 Business (In Development Now)
Reply With Quote
  #4  
Old 01-21-2009, 04:33 AM
 
GreatLakesVacuum GreatLakesVacuum is offline
 

eXpert
  
Join Date: Jan 2009
Posts: 286
 

Default 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!
__________________
X-Cart 4.5.4 Gold (Live Business Site)
X-Cart 5.1.9 Business (In Development Now)
Reply With Quote
  #5  
Old 01-21-2009, 09:50 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Product Details Width Question

whatever works works.
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 01-21-2009, 10:02 AM
 
GreatLakesVacuum GreatLakesVacuum is offline
 

eXpert
  
Join Date: Jan 2009
Posts: 286
 

Default 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!
__________________
X-Cart 4.5.4 Gold (Live Business Site)
X-Cart 5.1.9 Business (In Development Now)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:14 PM.

   

 
X-Cart forums © 2001-2020