ginabegin
ginabegin

Reputation: 53

Override CSS Background Image

I am not sure why I can't get an image to show up in the background of this site: http://backroadsbrewing.com/

I have tried using the !important; tag, uploading the photo into the Wordpress' library, and linking within the stylesheet to the URL.

Not sure if you're able to see the code of the site without me putting it up somewhere? If you need me to post it, please let me know.

Upvotes: 0

Views: 1710

Answers (1)

Markus
Markus

Reputation: 1114

You are not linking the correct css, you are linking the editing link.

<link rel="stylesheet" href="http://backroadsbrewing.com/wp-admin/theme-editor.php?file=style.css&theme=onesie">

If you open http://backroadsbrewing.com/wp-admin/theme-editor.php?file=style.css&theme=onesie in an inkognito window or after logging out, you get redirected to login page, which is wrong.

You need to link to your generated css file instead of some wp-admin/ url (which will never work).

The correct link would be in your case:

http://backroadsbrewing.com/wp-content/themes/onesie/style.css

Regards, Max

Additionally, you have added an obsolete semicolon:

background-image: url("http://wallpapercave.com/wp/Tb3g7Fv.jpg"); !important;
# instead of
background-image: url("http://wallpapercave.com/wp/Tb3g7Fv.jpg") !important;

And you should:

  1. never link to external pictures (they can always change or being removed)
  2. only link to pictures where you own rights to publish (or it can get really expensive, like a customer of me payed 900€ for a single picture he used for a couple of years.

Upvotes: 4

Related Questions