If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Additional image space

Additional image space

Started by kenshirou on 13 Feb 2013, 4:26 PM · Views: 665

Results 1 to 6 of 6
13 Feb 2013, 4:26 PM
#1
kenshirou avatar

kenshirou

Zen Follower

Join Date:
Oct 2012
Posts:
109
Plugin Contributions:
0

Additional image space

Hi all, I seem to be having a problem with the space of the additional images, as Zen Cart is giving it a value of 33% for 3 images per page and 50% for 2 images per page. I first thought this would be an override in the CSS in terms of layout, however when I right click and inspect element, it appears this element {33%} is not in the CSS file. I then did a search in the PHP and yet to find any values of 33% and and 50%.

Can anybody shed some light on this, and if there is a fix for the layout.

Thanks.

13 Feb 2013, 4:31 PM
#2
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Additional image space

I think you will find that the value is calculated dynamically based on the columner display code that creates the output.

if you want to bypass it you will have to custom code the output to not use the columner display.

Phil Rogers
A problem shared is a problem solved.

13 Feb 2013, 4:56 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Additional image space

You can override the dynamic width by making a CSS rule for the element specifying

width: 123px !important;
or
width: 24% !important;

The !important gives this rule precedence over inline styling.

13 Feb 2013, 6:46 PM
#4
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Additional image space

gjh42:

You can override the dynamic width by making a CSS rule for the element specifying

width: 123px !important;
or
width: 24% !important;

The !important gives this rule precedence over inline styling.
Learn something new every day! I always thought inline took precedence over css. Or is it that it does unless the css is set a important?

Phil Rogers
A problem shared is a problem solved.

13 Feb 2013, 8:53 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Additional image space

That's one of the main reasons for the !important tag, to allow stylesheets to take precedence over inline styling where necessary.
The tag is also good for giving individual element rules precedence over bigger rules that have enough specificity to otherwise control the styling. It can be used as a crutch, though; better to rework other rules where practical than just brute-force a new rule over the existing ones.

13 Feb 2013, 9:13 PM
#6
philip937 avatar

philip937

Totally Zenned

Join Date:
Aug 2009
Location:
Bedford, England
Posts:
968
Plugin Contributions:
0

Re: Additional image space

good to know! thanks for the info, its great :thumbsup:

Phil Rogers
A problem shared is a problem solved.