Using image value for :before and :after pseudo class content property in IE7

76 views
Skip to first unread message

Joff

unread,
Sep 19, 2012, 7:41:17 PM9/19/12
to ie7...@googlegroups.com
I'm having problems getting IE7 (with IE9.js) to correctly display image data as the content property when using either the :before or :after pseudo classes.  An example:

.someclass:before {
    content: url('images/image.png');
}

In IE8 & 9 the image is displaying correctly but in IE7 it fails to display, text content displays fine.  I've experimented with using base64 encoded values for the content property with no success.

Has anyone come across this before?

artnik

unread,
Oct 20, 2012, 10:58:36 AM10/20/12
to ie7...@googlegroups.com
Joff, You can use background:url(image.png) insted.
I have similar problem with displaying an image when using .myelement:hover:before { ... }. It works in IE9 but not in 7 and 8. Im also use ie9.js. 
Message has been deleted

artnik

unread,
Oct 21, 2012, 5:25:28 AM10/21/12
to ie7...@googlegroups.com
Here is the example http://dl.dropbox.com/u/45456135/tmp/1/page_buttons.html
There is a right corner that generates using the :before. It works in IE9. It can also work in IE8 but only if I dissable the ie9.js script.
Can somebody help me?
Reply all
Reply to author
Forward
0 new messages