Skip to main content
fix spelling
Source Link
Nicolai Grossherr
  • 18.9k
  • 8
  • 64
  • 109

WooCommerces css is pretty specific so it can be quite tricky to over rightoverride it sometimes. To over rightoverride their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.home-intro ul.featured-products li:nth-child(4n), div.home-intro ul.featured-products li.fourth { 
        width: 20%; 
        margin-top: 0; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should over rightoverride Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.

WooCommerces css is pretty specific so it can be quite tricky to over right it sometimes. To over right their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.home-intro ul.featured-products li:nth-child(4n), div.home-intro ul.featured-products li.fourth { 
        width: 20%; 
        margin-top: 0; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should over right Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.

WooCommerces css is pretty specific so it can be quite tricky to override it sometimes. To override their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.home-intro ul.featured-products li:nth-child(4n), div.home-intro ul.featured-products li.fourth { 
        width: 20%; 
        margin-top: 0; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should override Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.

deleted 7 characters in body
Source Link
ngearing
  • 2.2k
  • 1
  • 14
  • 16

WooCommerces css is pretty specific so it can be quite tricky to over right it sometimes. To over right their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.mainhome-wrapperintro ul.featured-products li:nth-child(4n), div.mainhome-wrapperintro ul.featured-products li.fourth { 
        width: 39%;20%; 
        margin-top: -20%;0; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should over right Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.

WooCommerces css is pretty specific so it can be quite tricky to over right it sometimes. To over right their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.main-wrapper ul.featured-products li:nth-child(4n), div.main-wrapper ul.featured-products li.fourth { 
        width: 39%; 
        margin-top: -20%; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should over right Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.

WooCommerces css is pretty specific so it can be quite tricky to over right it sometimes. To over right their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.home-intro ul.featured-products li:nth-child(4n), div.home-intro ul.featured-products li.fourth { 
        width: 20%; 
        margin-top: 0; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should over right Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.

Source Link
ngearing
  • 2.2k
  • 1
  • 14
  • 16

WooCommerces css is pretty specific so it can be quite tricky to over right it sometimes. To over right their css you need to be MORE specific with your css. So an example would be:

@media only screen and (min-width: 768px) {
    div.main-wrapper ul.featured-products li:nth-child(4n), div.main-wrapper ul.featured-products li.fourth { 
        width: 39%; 
        margin-top: -20%; 
    }
}

In the above example I have added a parent element to the css rule (div.main-wrapper). This rule is now more specific and should over right Woo's css. And you can just put this in the Custom css box, that should be fine.

Note: Ideally you should be making a custom image size and editing your template to use that image size.