0

Ok, this is the styling I want to be used

 .suggestion-taxonomies-product-visibility span {
      display: inline-block;
      float: left;
      padding-left: 10px;

    }

The usual of mentioning the element here doesn't seem to work, any ideas? I can specify more if need be. I am new and not great at specifying my problem!

Thanks.

Masivuye Cokile
  • 4,754
  • 3
  • 19
  • 34
MittenMits
  • 59
  • 10

3 Answers3

0

use important like

.suggestion-taxonomies-product-visibility span {
      display: inline-block !important;
      float: left !important;
      padding-left: 10px !important;

    }
  • I think it's is an bad idea. Try to avoid `!important` as much as you can. With the correct CSS selector you can do the same. – justkidding96 Aug 04 '17 at 14:30
0

Place your style after the theme stylesheet. It will override the theme styling. Better still, you can replace the suggestion-taxonomies-product-visibility class span styling in the styles.css file. If you opt for the latter, changes will be lost when updating the theme. You can avoid this by building a child theme to the theme you are currently using.

Adera
  • 27
  • 1
  • 7
  • I am little confused what exactly your first method is. I have created a child theme and that is what I am editing and it is still causing me issues. – MittenMits Aug 04 '17 at 15:01
  • On the header.php file, the theme's styles have been linked there. You simply place your styling below those links. If you're using a child theme, replace the rules in .suggestion-taxonomies-product-visibility span {} block with the rules you want to top be applied. – Adera Aug 07 '17 at 04:50
0

Use !important tag in each, ex:

.someclass {
 width: 10px !important;
}
  • I've tried this and it doesn't work... `.suggestion-taxonomies-product-visibility span { display: inline-block !important; float: left !important; padding-left: 10px !important; }` – MittenMits Aug 04 '17 at 14:53
  • @DavidJamesMitten those properties that you want to override are in the style attribute of your span? I mean, you have style attr will override any css. – Nicolas Manzanos Aug 04 '17 at 15:01
  • I'm not sure as it is hard to locate them, I am editing someone else's code. – MittenMits Aug 04 '17 at 15:32
  • There doesn't seem to be any specific attributes for the span tag. I have had some progression by adding a predesigned `clear: both;` that at least shows I can effect it. – MittenMits Aug 04 '17 at 15:40
  • @DavidJamesMitten check using chrome dev console (F12 on windows) and check if that span have some style attribute. Can you put more info about your file access, if you can edit php files of your theme, you can override any css and style attributes with JS and jQuery, using this code on header php file: – Nicolas Manzanos Aug 04 '17 at 16:01