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.

Subscribe and receive my FREE eBook


4 MISTAKES You’re Making on Your Website that are Costing You MONEY!

  • This field is for validation purposes and should be left unchanged.

The Author

Save

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ready to chat about how ThePixelPixie can help?