1

Have been losing my mind over this for hours - background image isn't changing. It all works changing it in Chrome's devtools but for some reason when I implement it in the CSS stylesheet it reverts back to this:

Here is my current code:

.navbar-brand.logo-white {
  background-image: url("inc/img/logo@2x.png");
  background-size: 154px 31px; }
  @media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3 / 2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {
.navbar-brand.logo-white {
  background-image: url("inc/img/logo@2x.png"); } }

I've been changing the .png after

background-image: url

To an image link, eg:

background-image:url("http://www.website.com/image.png");

But it refuses to acknowledge those changes. I'm not at all familiar with PHP but I thought an image change would be a simple CSS fix.

closed as off-topic by jgraup, Michael, bueltge, cjbj, kaiser Sep 3 '16 at 9:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • Where are you implementing this custom CSS, in your child's theme? May you provide a link to your website with this background image? – Ethan Jinks O'Sullivan Aug 31 '16 at 22:17
  • Do you have a cache plugin installed on the site? If so clear that and see if that updates your css. – brandozz Aug 31 '16 at 22:22
  • Hi there, sorry I wasn't able to provide more detail - the website wasn't to go live until this morning. The website in question is blog.sense.com, and I'm trying to change the "sense" logo at the top to the logo found in the header at sense.com. – HCL Sep 1 '16 at 15:44
0

We lack context, but remember that CSS files are read from top to bottom, the lower definitions having priority over the top ones. The same logic applies within the file. That is why the !important attribute is used for.

That being said, in your case you could have

  • A caching plugin that loads a cached copy of your CSS file. Effectively ignoring your changes.
  • A bottom rules overriding a top one.
  • A conflicting css target definition.
  • A bad css target definition.
  • A narrower css attribute definition overrider a broader one.
  • Something else I might not be thinking of right now

So check those things or provide us with better insight if nothing in that list fixes your issue.

  • Hi there, sorry I wasn't able to provide more detail - the website wasn't to go live until this morning. The website in question is blog.sense.com, and I'm trying to change the "sense" logo at the top to the logo found in the header at sense.com. – HCL Sep 1 '16 at 15:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.