Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

xc5 Full width product grid

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 09-17-2014, 05:30 AM
 
JannieB JannieB is offline
 

Senior Member
  
Join Date: Sep 2004
Posts: 117
 

Default xc5 Full width product grid

I am trying to create a design without any sidebar ... which I seem to have done.

I want the product grid to fill the full width of the page. Each product cell is set to 25% and the ul/li cells are floated left, so in theory it should fill the page and wrap as things shrink.

BUT, I am only getting three columns showing..... even if I reduce the cell size, it still only shows 3 columns .... it's as if it is leaving space for a sidebar, even though the <ul> appears to fill the whole width.

I have changed the PARAM_GRID_COLUMNS to default to 4 (at least I think I have) - not that this should make a differecne to a list based grid.

Just wondering is there is some sort of javascript thing going on connected with the responsive layout?

I am tearing my hair out trying to work out what is going on!

Any help/advice greatly appreciated ...

Jan
__________________
Jan Beesley
(Currently Xcart 5
Previously XCart Gold from 3.5....)
Reply With Quote
  #2  
Old 09-17-2014, 10:24 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: xc5 Full width product grid

Jan,
What about a link? So we can see the grid and look at the CSS?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 09-18-2014, 03:12 AM
 
JannieB JannieB is offline
 

Senior Member
  
Join Date: Sep 2004
Posts: 117
 

Default Re: xc5 Full width product grid

http://moletamunro.com.217-199-165-124.cipherwebhost.com/furniture/chairs_-_stools

(very much work in progress!)
__________________
Jan Beesley
(Currently Xcart 5
Previously XCart Gold from 3.5....)
Reply With Quote
  #4  
Old 09-18-2014, 05:32 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: xc5 Full width product grid

Jan,
Keep in mind that I am new to Bootstrap, there may be a better way to do this.

I see this code:
Code:
@media (min-width: 992px) { ul.products-grid.grid-list li.product-cell:nth-child(3n) + li.product-cell { clear: left; } }

Which is some crazy-cool CSS in my opinion.

In the middle of the second line, see that bit: li.product-cell:nth-child(3n) ?

Try changing it to li.product-cell:nth-child(4n)
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #5  
Old 09-18-2014, 07:37 AM
 
JannieB JannieB is offline
 

Senior Member
  
Join Date: Sep 2004
Posts: 117
 

Default Re: xc5 Full width product grid

By jove I think you've got it!

Found another way, though while diggin about in the css files.

In skins/default/en/css/bootstrap-responsive.less there's a setting which uses a class "no-sidebars".

So I added this class to the container div and voila!

the nth child things quite a useful thing to know though .... a new one on me... this explains it all http://css-tricks.com/how-nth-child-works/

Thanks for your help ... on to the next problem!

Jan
__________________
Jan Beesley
(Currently Xcart 5
Previously XCart Gold from 3.5....)
Reply With Quote

The following user thanks JannieB for this useful post:
totaltec (09-18-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:38 AM.

   

 
X-Cart forums © 2001-2020