-
AuthorPosts
-
May 22, 2013 at 2:20 pm #23653
I would really need to have a workaround for the search icon not displaying in the main menu in IE8. Atm it’s like a “pause” icon instead of a magnifying glass. I still have lots of IE8 visitors and nearly everyone in my company is forced to use IE8 (for security measures or whatever) so this will definitely be a big issue.
Is there a way to fall back to an image or something if IE8 is detected?
This is very important for me!
May 23, 2013 at 4:15 am #120649Hi,
You can do something like this on your custom.css
#menu-item-search {
background: url(../images/layout/loading.gif) no-repeat center9;
text-indent: -9999px9;
}Replace the image URL with a search icon. Don’t remove the 9, it means for IE8 and below
Regards,
Ismael
May 23, 2013 at 7:45 am #120650I tried this, but for some reason it only works when I do remove the /9. Of course, as you said, this also makes newer browsers use the image.
Could it be that IE8 doesn’t understand the /9?
May 23, 2013 at 7:46 am #1206519, not /9, sorry
May 24, 2013 at 2:59 am #120652Hi,
9 means for IE8 and below.
Can you give us a link to your website?
Regards,
Ismael
May 24, 2013 at 7:56 am #120653Testsite: http://goo.gl/s6iWu
May 24, 2013 at 10:43 am #120654I’d use a conditional: http://www.quirksmode.org/css/condcom.html instead – add following code to header.php (before the closing head tag):
<!--[if lt IE 9]>
#menu-item-search {
background: url(../images/layout/loading.gif) no-repeat center;
text-indent: -9999px;
}
<![endif]-->Replace the image url with an absolute url address which points to the icon on your server.
May 27, 2013 at 7:59 am #120655Ok, that did the trick. There is only one part missing in your code:
<!–[if lt IE 9]>
<style type=”text/css”>
#menu-item-search {background: url(http://www.transics.com/images/template/Search_trigger02_A.gif) no-repeat center; text-indent: -9999px;}
</style>
<![endif]–>
The <style> tag was not added. So just in case other people would find this useful, don’t forget to open and close the <style></style> tag around it.
Thanks, Dude!
May 28, 2013 at 7:47 am #120656Hi!
Yes, mea culpa – I forgot it :)
Best regards,
Peter
-
AuthorPosts
- The topic ‘IE 8 fallback for search icon(s) in menu’ is closed to new replies.
