carmelo arena
carmelo arena

Reputation: 561

CSS inherits transparent from nowhere

Basically this CSS rule:

background:url('../img/logo-small.png');

On any browser, translates into:

background: url("../img/logo-small.png") repeat scroll 0% 0% transparent;

I don't have any container that has a transparent rule, but apparently this prevents the background to be displayed. Strangely, background-color works instead.

If it's of any use, the content that appies to the CSS class is dynamically created with jQuery.

Is there a way to override this transparent parameter?

Upvotes: 0

Views: 70

Answers (1)

Dennis Traub
Dennis Traub

Reputation: 51654

In this case transparent refers to the background color of the element, which is transparent by default. You can override this by explicitly setting a color, e.g.:

background:url('../img/logo-small.png') #FFFFFF;

Upvotes: 3

Related Questions