0 votes
by (190 points)

Hello, I have a simple question that I just can't figure out. It goes without saying that I am very new to this, but I am really excited by what I have learned so far. I am trying to set a background image and then have the passage white on top of it, like this.

I can't get the background image to display, see here. Could you help me out? Thanks so much!

This is my code:

body {

background-image: url ("http://formationgrosman.com/images/background1.png");
color: darkgrey;
font-family: Futura,Impact,Helvetica,sans-serif;
font-size: 125%;
}


#ui-bar {
  background-color: white;

 

1 Answer

0 votes
by (68.6k points)

Your background-image property's value is incorrect.  It should be something like the following:

background-image: url("http://formationgrosman.com/images/background1.png");

The link you provided has the following instead (note the brackets):

background-image: url ["http://.formationgrosman.com/images/background1.png"];

Which, I'll note, is not what you presented in your example above.  When showing code, it's best to copy/paste your actual code rather than retyping it, because transcription errors like the one you introduced make finding the error difficult.

by (190 points)
Thanks so much. I also realized I was putting a space between the url and bracket. Thanks for helping a newbie :)
...