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

how to change # of tiles per row

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-14-2016, 05:00 PM
 
Iggy Iggy is offline
 

Advanced Member
  
Join Date: Apr 2016
Posts: 50
 

Default how to change # of tiles per row

hello, we are just starting to learn and experiment some with the software...

i have been able to do alot in custom css, but one thing i want to know how to do is changing the display for different sized screens...

for example, when experimenting with a top/bottom template style....smaller displays will automatically change 1,2,3 products per row depending for the screen size....perfect, they even change what size the tiles are...but when you go up to larger sizes display screens, it remains 4 wide and same sizing...this is where i wish it to be 5 product tiles wide...changing the size of the product tiles or background containers fails to accomplish this, they only crowd left leaving a blank space on the right...

i can do well with custom css but the template edit parts are still some confusing to me... this seems preety basic tho i hoped someone can just help for this one?
__________________
business 5.3.1.6
nginx/arch_linux/php 5.6-7/mariaDB10
Reply With Quote
  #2  
Old 04-14-2016, 08:04 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: how to change # of tiles per row

Iggy,
This should be simple enough, just a media query with a different percentage width. If you provide a link to the site we can inspect your CSS and give advice.
__________________
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 04-14-2016, 08:12 PM
 
Iggy Iggy is offline
 

Advanced Member
  
Join Date: Apr 2016
Posts: 50
 

Default Re: how to change # of tiles per row

well, i tried that a bit ya...i assume thats a part of the solution, but the problem i had was that it simply made the product tiles bigger or smaller and didnt change the grid layout for the largest size screens...so far its pretty stock installation, there are a couple different sites but i didnt learn about the test site policy/procedure yet either....was just going to ask of that too
one is a free lic, one is business lic btw...


edit: oh if it makes a better picture it has categories hidden, its as if only featured products headline the page on a top bottom template style
__________________
business 5.3.1.6
nginx/arch_linux/php 5.6-7/mariaDB10
Reply With Quote
  #4  
Old 04-14-2016, 08:19 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: how to change # of tiles per row

See not everybody is rocking your setup, that is never the case. What template are you using? What page layout? 1 column? 3 columns?
__________________
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 04-14-2016, 08:32 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: how to change # of tiles per row

So! Here we go:
The nth child of the list is being cleared. Consider this CSS:
Code:
@media (min-width: 1200px) { .no-sidebars ul.products-grid.grid-list li.product-cell:nth-child(4n) + li.product-cell { clear: none; } .no-sidebars ul.products-grid.grid-list li.product-cell { width: 20%; } }

See the ".no-sidebars" in the class definition? That is crucial to work on single column layouts.

-Mike
__________________
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

The following 2 users thank totaltec for this useful post:
Iggy (04-14-2016), qualiteam (04-14-2016)
  #6  
Old 04-14-2016, 09:22 PM
 
Iggy Iggy is offline
 

Advanced Member
  
Join Date: Apr 2016
Posts: 50
 

Default Re: how to change # of tiles per row

perfectly....thank you very much
__________________
business 5.3.1.6
nginx/arch_linux/php 5.6-7/mariaDB10
Reply With Quote

The following user thanks Iggy for this useful post:
totaltec (04-14-2016)
  #7  
Old 04-17-2016, 05:08 AM
 
Iggy Iggy is offline
 

Advanced Member
  
Join Date: Apr 2016
Posts: 50
 

Default Re: how to change # of tiles per row

oh...hmm...i maybe spoke to soon...i change one little detail, like length of a product title, and now the grid spacing is off, and worse, the hover function i added juggles the row below it around which is no good...

heres a test link u can see what im trying to do...
http://www.smokebomb.online/xcart/

see its 5 tiles wide is nice, and a hover effect to make them bigger...but when i hover the long product tile see what it does to the second row...

so 2 things i guess...

id like the grid to be more even vertically, and also the second row to remain in a fixed position...
__________________
business 5.3.1.6
nginx/arch_linux/php 5.6-7/mariaDB10
Reply With Quote
  #8  
Old 04-17-2016, 08:58 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: how to change # of tiles per row

This will take more than just a simple css change with width. The reason you have this effect now is the block heights are different. You have to either make them all the same or close every row before next one starts. But if you do this you cannot have 5 in a row as this will fore 2 on 3 products on some screen sizes.
Easiest to make height on all product blocks the same but them you will face some of them having too much empty space
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 04-17-2016, 02:54 PM
 
Iggy Iggy is offline
 

Advanced Member
  
Join Date: Apr 2016
Posts: 50
 

Default Re: how to change # of tiles per row

yes i was wondering to try this some...but wasnt sure the best way...generally our titles wont be longer than 3-4 rows on the product tiles...perhaps the titles could be vertically centered so shorter ones look less wierd?

thank you all for the helps
__________________
business 5.3.1.6
nginx/arch_linux/php 5.6-7/mariaDB10
Reply With Quote
  #10  
Old 04-18-2016, 10:20 PM
 
Iggy Iggy is offline
 

Advanced Member
  
Join Date: Apr 2016
Posts: 50
 

Default Re: how to change # of tiles per row

ok, so i notice someone else also bring this up and i try the solution offered in that topic

Quote:
/*product tile evener*/
.products-grid li.product-cell .product {
min-height: 450px;}
/*product tile evener*/

tiles even, halfway there!

the other issue is still persisting...it is because i have increased images sizes from default 160 to 300, to allow a larger hover zoom effect.....which still makes the second row juggle around...anyone know how i can lock those down?
i updated the code on the link to the test site so you can easily verify...
__________________
business 5.3.1.6
nginx/arch_linux/php 5.6-7/mariaDB10
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 09:43 PM.

   

 
X-Cart forums © 2001-2020