Jump to content

Display of home featured products


Recommended Posts

Hi,

 

I would like to show 3 products in my home featured module, by default it's set to 4. I modified the homefeatured.tpl file -> assign var='nbItemsPerLine' value=3.

Then I tried to modify the css file:

#featured-products_block_center li {
margin-right:10px;
padding:10px 0;
width:126px;
height:240px
}
 
and modify the width param so I don't get an space where the fourth item was but no success. See attachment, I would like to spread products so they are wider.... so the first 3 products fit in the first line without the space.
 
Any idea where else I should modify?
 
Thanks in advance!

post-716402-0-35097500-1400661008_thumb.jpg

Link to comment
Share on other sites

In the global.css file you need to change the col-md-3 width. The only thing is that this also changes the column width on the products page.

What I did was I went into the homefeatured.tpl and changed where it has <li class="ajax_block_product col-xs-12 col-sm-4 col-md-3 last-line last-item-of-tablet-line last-item-of-mobile-line"> and added a 2 after the 3. Then I went back in global.css and made a new rule for col-md-32 and I was able to change the widths of both columns separately. 

 

Using the Chrome Developer Tool has been really helpful with changing the CSS...just find where the line of code is and then do a search for the class in your files.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...