CSS Problem in IE7
I am using asp:button for my asp.net project. I wrote one css Class. It perfectly apply Css style and show image in the asp:button.
It is working fine in FF, Safari and IE8. But the Css Class does not work in IE7, How to solve? and my Code is:开发者_运维问答.likeImage {
background-image:url('images/LikeNew.png');
background-repeat:no-repeat;
background-position:top left;
width:65px;
height:24px;
cursor:default;
text-align:left;
padding-left:5px;
margin:0px;
padding:0px;
}
try this :
padding: 0 0 0 5px;
You used (padding-left:5px;)
and (padding:0)
this is not the right way.
just use
padding:5px;
Then please check.
Add border:0;
in your CSS for asp:button
.
Internet Explorer calculates padding towards inside of a block, while other browsers calculates padding towards outside of a block.
In IE, Actual Width
= CSS width
.
Others, Actual Width
= CSS width
+ Left Padding
+ Right Padding
.
The second one is standard CSS approved by W3C.
精彩评论