Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / CSS issue with displaying Monthly Specials

CSS issue with displaying Monthly Specials

Locked

Views: 878

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
1 Nov 2010, 10:55 AM
#1
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

CSS issue with displaying Monthly Specials

Attachment #8357

There is an image in the attachments which shows what the problem is. The problem is that product images are scrumbled often but not all the time. Any idea how to fix it?

1 Nov 2010, 11:59 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: CSS issue with displaying Monthly Specials

Your products are being floated left in your stylesheet. This means that there will be introduced on the right and floated across to the left taking up the highest position they can.

In the example you've given, the bottom of the top right most product is higher than the bottom of the product to its left. So the fourth product gets stuck there, throwing out the products that follow.

Why? Can't tell that from a picture along. Would need to see you markup and the css interacting with it.

1 Nov 2010, 12:09 PM
#3
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

Hi Kuroi

Would you like to have a look at this first:

http://www.millers-graphics.co.uk/index.php?main_page=shopping_cart&sort=20a

Try to refresh the website couple of times, you'll see it changes: it looks fine sometimes but also get scrumbled.

Thanks

1 Nov 2010, 12:10 PM
#4
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

I had to refresh aprox. 7 times to get wrong result.

1 Nov 2010, 12:27 PM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: CSS issue with displaying Monthly Specials

You'll get that result any time you have a product in columns one or two where the product name runs to two lines.

In standard Zen Cart there is a <br class="clearBoth /> tag inserted after each line to ensure that every product can float right across, even when the previous line contains products requiring varying heights.

On your site these have been removed, which is why products are snagging on those that are taller than normal.

1 Nov 2010, 12:35 PM
#6
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

Kuroi. Thanks

I will ad <br class="clearBoth /> to my site. I don't want to add to css file though, instead I would like to add it to template file. Any idea which one would it be? Is it tpl_shopping_cart_default.php?

Thank you again for your help.

1 Nov 2010, 12:51 PM
#7
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

What file should I amend? I am trying to figure it out by myself but no luck so far

1 Nov 2010, 1:30 PM
#8
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

Any ideas?

6 Dec 2010, 10:27 AM
#9
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

I am still trying to work this out but this is out of my skills. Has anyone have aa idea where to put this <br class="clearBoth /> tag? :frusty:

6 Dec 2010, 11:20 AM
#10
safeg avatar

safeg

Zen Follower

Join Date:
Apr 2009
Location:
Edinburgh
Posts:
130
Plugin Contributions:
0

Re: CSS issue with displaying Monthly Specials

Got the solution at the end. The problem was missing <br class="clearBoth /> in ... tpl_columnar_display.php

I have just compared both files from my templata and default template and found out from what line its missing. Placing <br class="clearBoth /> has also fixed my other issues:

http://www.zen-cart.com/forum/showthread.php?t=168994 with categories display problem