Greg Gum
Greg Gum

Reputation: 37905

Why does background image not show behind text?

I have a site with a splash page which has a background image. There is text on top of the image. The issue is that the background of the text is white, instead of being transparent so the image shows through.

How do I set the background to transparent?

Upvotes: 0

Views: 135

Answers (2)

Uwe Kischkel
Uwe Kischkel

Reputation: 1

Try to add to the class ".message" -> background-color:transparent;

Upvotes: -1

bgoldst
bgoldst

Reputation: 35314

The issue is that you've set your background image in the styling of the <html> tag, which sits underneath the <body> tag, and <body> is styled with background-color:#fff.

I suggest you move the background image to the <body> tag, replacing the background-color:#fff with it. In other words, move the class="backgroundImage" attribute from <html> to <body>.

As a general note, transparent is the default value for background-color, so if something is not transparent, it's because there's some code somewhere that's nixing that transparency.

Upvotes: 3

Related Questions