问题
On this site, I have a search form whose submit button has a background image
But when I view the site in IE8, the image doesn't appear.
Is there anything I can do to persuade IE8 to show the image (that doesn't cause it to disappear in other broswers)?
回答1:
It appears that the image is present, but barely visible. Try setting the height and width of the input
. This makes the image visible for me:
.searchform INPUT[type='submit'] {
width: 18px;
height: 18px;
}
回答2:
I got it working in IE8 in this fiddle
I didn't see anywhere in your code that the background image is actually set in IE8. It shows in Chrome. Are you using multiple style sheets based on browser? Or browser specific rules in your styles?
来源:https://stackoverflow.com/questions/9332783/submit-button-with-background-image-in-internet-explorer-8