Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
.arrow:before {
           content: url('../images/Popup.gif');}

CONTENT PROPERTY IS NOT WOKING IN IE7 PLEASE TELL ME ALTERNATIVE TO CONTENT BUT IT IS WORKING IN IE8 BROWSER COMPATIBILITY ISSUE MY APPLICATION WILL WORK IE7 AND ABOVE VERSIONS
Posted

.arrow:before

:before, :after.. etc are CSS 3.0 version, so it not supported on IE7,
for CSS 3.0 supported partially in IE 10.

check here
 
Share this answer
 
Comments
Member hani 2-Apr-15 6:35am    
there is no alternative to dispaly image in ie7?
Solai Raja 2-Apr-15 6:54am    
you have <img> available on html
Member hani 2-Apr-15 7:07am    
in css img is not working
Solai Raja 2-Apr-15 7:14am    
img src="../images/Popup.gif", i am saying that HTML tag check this
Member hani 2-Apr-15 7:20am    
but i want to display in css how? there is no scope to apply in html , actually the :before is not applying if i remove then my styles gone what to do?
In addition to Solution 1, that correctly explains why you are seeing this issue in IE7.

IE8 provides partial support for :before and :after pseudo-elements[^]. This explains why you are only experiencing this issue in IE versions < 8.

This css feature was introduced as part of CSS2.1[^].

To replicate this functionality in IE7, try using the Moderizr [^] library.

After including the library to your page, the below snippet should replicate you css in IE7.
JavaScript
if (!Modernizr.generatedcontent) 
{
    $('.arrow').prepend('<img src="../images/Popup.gif" />');
}



... hope it helps.
 
Share this answer
 
v3
Comments
Member hani 2-Apr-15 6:36am    
there is no alternative to dispaly image in ie7?
hypermellow 2-Apr-15 6:56am    
Yes, there are lots of alternatives to display the image in IE7, although none using CSS before/after selectors.
A good approach would be have a look at the modernizr JavaScript library (http://modernizr.com/) - this includes a CSS Generated Content tool - this can detect supported/unsupported css features, and provides a mechanism to replicate via Javascript.

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