Click here to Skip to main content
15,904,926 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi,
i am added sprite images in my page, in firefox browser showing properly, but in IE has some problum,
here i wrote the code

<pre lang="html">&lt;div class=&quot;projectProgressBubbleDocked&quot;&gt;
&lt;h3 style=&quot;removed -11px;&quot;&gt;
&amp;lt;asp:Label ID=&quot;lblProposed&quot; runat=&quot;server&quot; Text=&quot;&amp;lt;%$ Resources:Abatement, Proposed %&amp;gt;&quot;&amp;gt;
&lt;/h3&gt;

&amp;lt;asp:Image ID=&quot;imgProposed&quot; runat=&quot;server&quot; style=&quot;position:relative;margin-left:6px;top:-1px;display:block;z-index:1 &quot; meta:resourceKey=&quot;imgBtnProposedResource1&quot; CssClass=&quot;progressInitiativesGreen1&quot; /&amp;gt;

&lt;div class=&quot;progresBubbleConnector&quot; style=&quot;removed:relative;removed-30px;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;projectProgressBubbleDocked&quot;&gt;
&lt;h3 style=&quot;removed -11px;&quot;&gt;
&amp;lt;asp:Label ID=&quot;lblPlanned&quot; runat=&quot;server&quot; Text=&quot;&amp;lt;%$ Resources:Abatement, Planned %&amp;gt;&quot;&amp;gt;
&lt;/h3&gt;
&amp;lt;asp:Image ID=&quot;imgPlanned&quot; runat=&quot;server&quot; style=&quot;position:relative;margin-left:16px;top:-1px;&quot; CssClass=&quot;progressInitiativesGreen1&quot; meta:resourcekey=&quot;imgPlannedResource1&quot; /&amp;gt;
&lt;/div&gt;
&lt;div class=&quot;projectProgressBubbleDocked&quot;&gt;
&lt;h3 style=&quot;removed -11px;&quot;&gt;
&amp;lt;asp:Label ID=&quot;lblInProgress&quot; runat=&quot;server&quot; Text=&quot;&amp;lt;%$ Resources:Abatement,InProgress %&amp;gt;&quot;&amp;gt;
&lt;/h3&gt;
&amp;lt;asp:Image ID=&quot;imgInProgress&quot; runat=&quot;server&quot; CssClass=&quot;progressInitiativesGreen1&quot; style=&quot;position:relative;margin-left:26px;top:-1px;&quot; meta:resourceKey=&quot;imgBtnInProgressResource1&quot; /&amp;gt;

&lt;/div&gt;
&lt;div class=&quot;projectProgressBubbleDocked&quot;&gt;
&lt;h3 style=&quot;removed -11px;&quot;&gt;
&amp;lt;asp:Label ID=&quot;lblCompleted&quot; runat=&quot;server&quot; Text=&quot;&amp;lt;%$ Resources:Abatement, Completed %&amp;gt;&quot;&amp;gt;
&lt;/h3&gt;
&amp;lt;asp:Image ID=&quot;imgCompleted&quot; runat=&quot;server&quot; style=&quot;position:relative;margin-left:36px;top:-1px;&quot; CssClass=&quot;&quot; meta:resourceKey=&quot;imgBtnCompletedResource1&quot; /&amp;gt;
&lt;/div&gt;
&lt;div class=&quot;projectProgressBubbleDocked&quot;&gt;
&lt;h3 style=&quot;removed -11px;&quot;&gt;
&amp;lt;asp:Label ID=&quot;lblRejOrCancelled&quot; runat=&quot;server&quot; Text=&quot;&amp;lt;%$ Resources:Abatement, Rejected %&amp;gt;&quot;&amp;gt;
&lt;/h3&gt;
&amp;lt;asp:Image ID=&quot;imgCancelled&quot; runat=&quot;server&quot; style=&quot;position:relative;margin-left:45px;top:12px;top:-1px;&quot; CssClass=&quot;progressInitiativesGreen1&quot; meta:resourceKey=&quot;imgBtnCancelledResource1&quot; /&amp;gt;
&lt;/div&gt;
&lt;div style=&quot;float:right; padding: 35px 13px;&quot;&gt;&lt;/div&gt;</pre>

atuvally here i called sprite images by using css class ,

.progressInitiativesGreen1, .progressInitiativesRed1, .progressInitiativesBlue1,progresBubbleConnector
<pre lang="cs">{
background: transparent url(&quot;images/sprite.png&quot;) no-repeat;
cursor: pointer;
display:block;
}</pre>
<pre lang="css">.progresBubbleConnector
{
width: 515px;
height:35px;
}
.progresBubbleConnector
{
background-position: -455px -664px ;
}</pre>

<pre lang="css">.progressInitiativesGreen1, .progressInitiativesRed1, .progressInitiativesBlue1
{
height: 23px;
width: 23px;
}</pre>
<a href=""></a>
Posted
Updated 27-Dec-11 21:54pm
v6
Comments
Pete O'Hanlon 20-Dec-11 7:34am    
What issues does it have? We cannot guess based purely off code like this.
Nigam Patel 20-Dec-11 22:56pm    
Can u Please post the Error page what display in IE and What is display in Firefox so we can guess what is your problem.

1 solution

For your solution you can try this...

make proper css for Firefox and make another for IE and
as per the browser you can load different css file so it will work fine with that browser...

please see this...

http://www.brightcherry.co.uk/scribbles/2008/09/01/using-different-css-stylesheets-for-different-browsers/[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900