Skip to content Skip to sidebar Skip to footer

Button Element Styled With Css Is Not Showing The Background-image In Ie6

I have a legacy web application that is targeted for IE 6 and is being reskinned. The buttons are having the default browser button look replaced with a blue button image. My fol

Solution 1:

If the recesses of my memory on IE6 serve me well, it does not recognize background-image on a button element. Nothing you can do about it.

Although, again based on memory, if you can change it to an input (attribute type="image") you might be able to get the effect you want even on IE6.

Solution 2:

Using the background CSS property instead of the background-image property does the trick as described in this blog post (excerpt below).

The background-image property that worked in Firefox 2.0 just did not have any effect on IE6. After a bit of googling, I realized that the background-image property will not work on IE and that we need to use the background property.

This is what works for me:

button
{
    background: transparent url('../images/button.png') no-repeat top;
}

Post a Comment for "Button Element Styled With Css Is Not Showing The Background-image In Ie6"