Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 1273

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 1310

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 1314

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 1342

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 3464

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 3471

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 3484

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/plugins/gravityforms/common.php on line 3972
How to override inline CSS | Pixie Nerd Theme
Go to the top

How to override inline CSS


Notice: Trying to access array offset on value of type bool in /home/dh_432dct/themedev.thepixelpixie/wp-c0nt3nt/themes/darwin/single.php on line 246

Apparently this trick has been around for a loooooong time, but I only just learned of it. So I’m pretty sure there are others who will benefit from it as well.

So, let’s say you have a div that looks something like this:

<div class="something" style="background: #999;">Stuff</div>

Maybe this is a div created by a plugin and it inlines those styles through some options on the backend, or you just don’t have access to make changes to the theme files directly. This is a nifty little trick you can use:

div.something[style] {
     background: #678696 !important;
}

That’s all there is to it!

Let me know in the comments below if this helped you or if you’ve had any difficulties getting it to work.