Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Help needed with Horizontal Line in product listing

Help needed with Horizontal Line in product listing

Locked

Views: 1,000

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
26 Sep 2010, 6:54 PM
#1
marvin avatar

marvin

Zen Follower

Join Date:
Feb 2006
Posts:
222
Plugin Contributions:
0

Help needed with Horizontal Line in product listing

Have spent a lot of time searching and reading through numerous threads trying to add a horizontal line between my product listings - product, new, all, featured etc.

Finally tried the following -
.productListing-odd td, .productListing-even td {
vertical-align: top;
border-bottom: 1px solid #ff0000; padding: 2 3px;
}

.allproductListing-odd, .allproductListing-even {
vertical-align: top;
border-bottom: 1px solid #ff0000; padding: 2 3px;
}

.newproductListing-odd, .newproductListing-even {
vertical-align: top;
border-bottom: 1px solid #ff0000; padding: 2 3px;
}

.featuredproductListing-odd, .featuredproductListing-even {
vertical-align: top;
border-bottom: 1px solid #ff0000; padding: 2 3px;
}

This works OK in -productlisting - but WEIRDLY in allproductListing and NOT AT ALL in newroductListing & featuredproductListing

MY website is https://www.sourceforherbs.com

Some help would be appreciated.

27 Sep 2010, 12:57 AM
#2
marvin avatar

marvin

Zen Follower

Join Date:
Feb 2006
Posts:
222
Plugin Contributions:
0

Re: Help needed with Horizontal Line in product listing

Still need help!!! Please, anybody????

27 Sep 2010, 7:40 AM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Help needed with Horizontal Line in product listing

The new, all and featured listings are built by completely different template files, and have few if any of the same classes/ids to style. Your site/template appears to be built on a Zen Cart v1.3.7 base, and may not have a feature built into current v1.3.9 code
(* @version $Id: tpl_modules_products_new_listing.php 6096 2007-04-01 00:43:21Z ajeh $)
which puts a <hr> between each product in the listing. Your template has nothing unique enough to style a border between products in those listings. You would need to edit /includes/templates/your_template/tpl_modules_products_new_listing.php and its siblings to add the <hr>. The v1.3.9 file looks like this near the bottom:```php
echo $display_products_description;
?>
</td>
</tr>

<?php } ?>
      <tr>
        <td colspan="3"><hr /></td>
      </tr>
<?php $products_new->MoveNext(); } } else { ```
27 Sep 2010, 8:18 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Help needed with Horizontal Line in product listing

Seems I just didn't look hard enough for the needle. Your template has the <hr> between each product, but it is set to white so that it is essentially invisible unless you cilck on just the right spot to inspect, or go through view source.

You can edit this line in your stylesheet.css

hr{ height: 1px; margin-top: 5px; border: none; border-bottom: 1px solid #ffffff; }

or if you don't want to change all <hr> from white, you can add a rule like

#newProductsDefault hr, #featuredDefault hr, #allProductsDefault hr {color: #aabbcc;}

27 Sep 2010, 2:27 PM
#5
marvin avatar

marvin

Zen Follower

Join Date:
Feb 2006
Posts:
222
Plugin Contributions:
0

Re: Help needed with Horizontal Line in product listing

Thanks for your help will try it out.

27 Sep 2010, 6:29 PM
#6
marvin avatar

marvin

Zen Follower

Join Date:
Feb 2006
Posts:
222
Plugin Contributions:
0

Re: Help needed with Horizontal Line in product listing

gjh42.

Thanks for your help.

I've succeeded in getting the correct horizontal rules between products for "new products listing" and "featured products listing" and category products listings.

BUT, "all products" listing has an EXTRA hr above and below the product descriptions.

See my site https://www.sourceforherbs.com

Thanks again

27 Sep 2010, 7:42 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Help needed with Horizontal Line in product listing

The all products template is the only one of the three that uses the .productListing-odd and .productListing-even class tags. Add to the bottom of your stylesheet

#allProductsDefault .productListing-odd td, #allProductsDefault .productListing-even td {
border: none;
}

27 Sep 2010, 9:19 PM
#8
marvin avatar

marvin

Zen Follower

Join Date:
Feb 2006
Posts:
222
Plugin Contributions:
0

Re: Help needed with Horizontal Line in product listing

Thanks, it worked.