ASP.NET Web API      Interview Questions         HTML 5                               jQuery                              ASP.NET MVC framework

Wednesday, March 13, 2013

CSS - background-image issue in IE non-compatibility

I have been facing an issue with background-image for IE non-compatibility mode, Firefox and Chrome. Actually, the image is not displayed in IE non-compatibility, Firefox and Google Chrome. In IE compatibility, images displayed properly without issue.


CSS style for my button was as follows:
.btnStyle
{
font-family:Arial;
font-size:8pt;
color:White;
background: none url('../Images/btn.gif');
border: none;
height:23px;
font-weight:normal;
}

In above code, 'none' for background is basically default value.
I googled online and after hit and trial, I just remove 'none' from background. so, button background style looks like:

background: url('../../Images/btn.gif');

It resolved the issue for IE non-compatibility, Chrome and Firefox.  Hopefully, it will be helpfull for those facing the same problem during their Web Development efforts.




Be social and share with others via:



Other Recommended Web Development Articles:

By Imran Abdul Ghani
Software Developer (Senior)
United Arab Emirates
Imran Abdul Ghani is working as Software Developer(Senior) with extensive knowledge in Web development technologies especially C#, ASP.NET, MVC, WCF, Web API, ADO.NET Entity Framework, jQuery etc. He has several years of experience in designing/developing enterprise level applications. He is Microsoft Certified Solution Developer for .NET (MCSD.NET) since 2005. You can reach his blogging at www.webdevelopmenthelp.net & www.topwcftutorials.net.

No comments:

Post a Comment