Zen Cart Logo

stylesheet woes

Locked

Views: 1,181

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Aug 2008, 11:01 AM
#1
darkswan avatar

darkswan

New Zenner

Join Date:
Jan 2005
Location:
Mosquito Coast, Texas
Posts:
90
Plugin Contributions:
0

stylesheet woes

I have a very customized style sheet and for some reason, the centered content for the New products, Special Products and Featured Products has a strange error. When set to 2 products per column, viewing the page via the Developer tools, it gives a width of 50%, yet it will only display the products in a single column.
additionally, when set to 3 products per column, it gives a width of 33%, but will only display 2 products per row across.
I've been thrashing this for going on 3 weeks now and I am totally stumped. I cannot change the width via the style sheet, as it seems to be hard coded somewhere in the cart files. Plus it displays "style" selector before the "class" selector. Any help is appreciated.

http://www.greenmeadowscosmentics.com/store

thanks

7 Aug 2008, 11:11 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: stylesheet woes

Your link currently is bad???
Most probably margin & padding issues

You might find what you need HERE

7 Aug 2008, 11:45 AM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: stylesheet woes

Typo. The link is:

http://www.greenmeadowscosmetics.com/store/

I'd guess that your answer is in the link kobra provided.

Very nice looking site.

7 Aug 2008, 11:46 AM
#4
nicko2 avatar

nicko2

New Zenner

Join Date:
Aug 2006
Posts:
25
Plugin Contributions:
0

Re: stylesheet woes

darkswan:

I have a very customized style sheet and for some reason, the centered content for the New products, Special Products and Featured Products has a strange error. When set to 2 products per column, viewing the page via the Developer tools, it gives a width of 50%, yet it will only display the products in a single column.
additionally, when set to 3 products per column, it gives a width of 33%, but will only display 2 products per row across.
I've been thrashing this for going on 3 weeks now and I am totally stumped. I cannot change the width via the style sheet, as it seems to be hard coded somewhere in the cart files. Plus it displays "style" selector before the "class" selector. Any help is appreciated.

http://www.greenmeadowscosmentics.com/store

thanks

yeah i had same problem trying to display 3 items accross - it would only display 2. Seems the code sets a width for each box depending on how many items you set to display, so 3 items sets each box to 33%. you would think that would be fine if total width=100% because 3x33%=99% but I think additonal margins or padding stuff it. so to fix I just added a manual width setting.

look for file modules/YourTheme/new_products.php

edit this line:

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',

change to:

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . 30 . '%;"',
7 Aug 2008, 12:35 PM
#5
darkswan avatar

darkswan

New Zenner

Join Date:
Jan 2005
Location:
Mosquito Coast, Texas
Posts:
90
Plugin Contributions:
0

Re: stylesheet woes

kobra:

Your link currently is bad???
Most probably margin & padding issues

You might find what you need HERE

that worked perfectly, thanks!
I think I will have hair left after all.