How do you add a background image in CSS?
I need a code to paste into the CSS editor. I was originally using this code . . .
font-family:Arial, Helvetica, Georgia, Sans-Serif;
background:#666 url(’URL of image here‘);
. . . But it doesn’t seem to be working. Can someone sort this out for me?
The blog I need help with is tubbotwins.wordpress.com.
Assuming you do have the CSS upgrade, you do realize that where it says “URL of image here” actually goes uhm… the URL of the image you want to display right?
Also, don’t use pixel units for font-sizes… is of bad practice. I’d recommend you using ’em’ units instead. The equivalent to 12px is .75em
Yeah, I know you put in the URL of a picture.
And I haven’t purchased the Upgrade yet. I’m just “experimenting.”
if you’re “experimenting” with the code you posted, of course it won’t work because the browser is interpreting your code as with bad syntax since you do need an URL path there.
Remove the “url()” and leave just the HEX code value of the background property, you should see then that the background is gray. If you place an actual image path there, you should see such image as well.
Wow, you don’t get it, do you?
Explain what isn’t working. You are giving us nothing to go on.
Also explain what you want the code to do.
well, you are the one asking for help, obviously you don’t know how to do it. On the other hand I know how to do it and I’ve given you solutions to what’s possible the cause of your background not being displayed despite the fact that you haven’t given more details on what you’ve been doing so far and failed.
I can certainly diagnose and debug code, I do more than CSS on a regular basis, but reading minds and trying to decipher what you’re trying to do is certainly not my forte.
If you find me thick enough to not get it. You might want to try Google and find your answers there, unless of course, another forum volunteer is kind enough to help you out.
I might also want to experiment with the css upgrade.
Where is the css editor located?
Nevermind, I found it. Thanks.
appearance > edit css
The topic ‘How do you add a background image in CSS?’ is closed to new replies.