-
AuthorPosts
-
Pankaj Sharma Moderator
Pankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 4, 2017 at 8:10 am #1024488Hi
Add below code in /css/custom.css file@media(max-width: 468px){ .com_virtuemart div[class*="-view"] .row div.product { width: 46%!important; float: left; height: auto; } .com_virtuemart div[class*="-view"] .row {display: -webkit-box!important;} }
Please note it will make them in two columns and in mobile the space is not enough to display two items.
Regards
April 4, 2017 at 8:54 am #1024502in order to have more space, need to make each product box width smaller. maybe showing 4 columns in desktop and 2 coloumns in mobile. how to do that?
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 4, 2017 at 9:06 am #1024504You can decrease the width value in above if you want to reduce the width.
Regards
April 4, 2017 at 9:18 am #1024507I changed to 30%, but there is no change on the mobile view. still not enough space.
@media(max-width: 468px){ .com_virtuemart div[class*="-view"] .row div.product { width: 30%!important; float: left; height: auto; }
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 4, 2017 at 9:47 am #1024511Yes
Thats why i already said in last threads , in mobile screen space is very small, and product does not fit well. I suggest you to use product full width as it was before. RegardsApril 5, 2017 at 3:54 am #1024655I am sorry, but we must have 2 columns for that.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 5, 2017 at 4:46 am #1024667This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 5, 2017 at 4:53 am #1024668http://cowcowkidsmo.com/%E5%AA%BD%E5%92%AA%E8%AD%B7%E7%90%86%E7%94%A8%E5%93%81%5B/quote]
Hi
For height add below code in custom.css file and set a min-height as per needs@media(max-width:468px){ .com_virtuemart div[class*="-view"] .row .vm-col .spacer { min-height:500px;}}
April 5, 2017 at 5:49 am #1024678This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 6, 2017 at 4:00 am #1024845Hi
If you will show a product in less area there can be a style issue, that will come as i already mentioned above. I am afraid that this is something that will not change. Its simply if you will fit 50px in 10px are it does not fit well.April 10, 2017 at 10:21 am #1025484This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
April 10, 2017 at 10:51 am #1025501Hi
The products use 3 columns layout and follow the same for the mobile.
You can add a min-width for product and use the same code.@media(max-width: 468px){ .com_virtuemart div[class*="-view"] .row div.product { width: 30%!important; float: left; height: auto; min-width: 50%; } .com_virtuemart div[class*="-view"] .row {display: -webkit-box!important;overflow: visible;max-width: 100%;} }
Either use 1 column in mobile o r 3 column.
this is all i can suggest in the available options.Hope its clear now.
April 10, 2017 at 10:59 am #1025502This reply has been marked as private.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
-
AuthorPosts
This topic contains 23 replies, has 2 voices, and was last updated by Pankaj Sharma 7 years, 7 months ago.
The topic ‘How to show product page with 2 columns in mobile?’ is closed to new replies.