Hi, I added this code for custom css on my collections page and I wanted it to change only the desktop width and not the mobile width. This is the code:
{ margin-top: 30px; margin-bottom: 0px; margin-left: 70px; margin-right: 70px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; }
Can someone help me with this?
@luxoptions Hello,
What class are you using for this css code ?
You can do:
//You can manage the min-width based on your needs here.
@media screen and (min-width: 992px) {
//Here you place your css code for Desktop
.yourclass { margin-top: 30px; margin-bottom: 0px; margin-left: 70px; margin-right: 70px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; }
}
Hope it helps.
I’m using this width change for the entire collection page. What class would I use for the entire page because right now it’s not working. Here is my code
@media screen and (min-width: 992px) {
{ margin-top: 30px; margin-bottom: 0px; margin-left: 70px; margin-right: 70px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; }
}
Hello @luxoptions ,
Can you share your website url? What theme are you using ?
So you need to enter the class of the wrapped container and use it in order to work as I have shown you in the example.
I’m using the flex fresh theme and the url is https://www.luxoptions.com/ but I am working on an unpublished theme
@lemondev also i am having trouble finding what class to use since i am using the margin change for the entire page.
@luxoptions Maybe you can try on this class like this:
@media screen and (min-width: 992px) {
.collection-matrix{ margin-top: 30px; margin-bottom: 0px; margin-left: 70px; margin-right: 70px; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; }
}
The “.collection-matrix” is the the container of your products, so I believe here you want to set those properties.
Hope this helps.
it’s still not working for me. is this because i have a third party theme? @lemondev