Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove background-image in css?

Tags:

html

css

People also ask

How do I remove the background from a PNG in CSS?

Option 1: Pure CSS [Limited Support]By putting the blend mode to screen you can remove the white background of your png image.

How do I make background image transparent in CSS?

opacity is a CSS property that allows you to change the opaqueness of an element. By default, all elements have a value of 1 . By changing this value closer to 0 , the element will appear more and more transparent. A common use case is using an image as part of the background.


Try:

div#a {
    background-image:none
}

div#a {
    background-image: none;
}

div#a {
  background-image: none !important;
}

Although the "!important" might not be necessary, because "div#a" has a higher specificity than just "div".


div#a {
  background-image: url('../images/spacer.png');
  background-image: none !important;
}

I use a transparent spacer image in addition to the rule to remove the background image because IE6 seems to ignore the background-image: none even though it is marked !important.


Since in css3 one might set multiple background images setting "none" will only create a new layer and hide nothing.

http://www.css3.info/preview/multiple-backgrounds/ http://www.w3.org/TR/css3-background/#backgrounds

I have not found a solution yet...