WordPress.org

Support

Support » Themes and Templates » [Resolved] IE7/8 problem menu navigation with images

[Resolved] IE7/8 problem menu navigation with images

  • Hi guys,

    I have created a WordPress theme. This theme is quite simple/static and has a menu with six navigation buttons which are images. The site can be seen here.

    In Chrome, Safari, Opera, IE9/10 all is well. In IE 7 and IE 8, they are not. No image is shown!

    I’ve looked all day at numerous solutions regarding IE problems, but none of them fixed my problem. So, please help me!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You’ve a HTML4 doctype, yet you’re using HTML5 elements. Amend that.

    Done. Didn’t fix my problem though…

    Now install this plugin http://wordpress.org/plugins/respondjs/

    Plugin installed, but doesn’t seem to work…

    Moderator Michael

    @alchymyth

    the whole style.css seems to be wrapped in @media screen { which is ignored by older browsers.

    find out what the reason behind that is, and if it is not important, remove it.

    or alternatively, add a conditional IE stylesheet or styles.

    Hi alchymyth,

    Removed the @media screen line but that also didn’t help…

    For some reason in IE your <nav> element is not being populated, therefore try removing the nav selector from your CSS.

    Moderator Michael

    @alchymyth

    it will probably need a combination of the above suggested remedies;

    do you still have the plugin http://wordpress.org/plugins/respondjs/ activated?

    if the plugin together with the edits to style.css does not help, have a look at how for instance Twenty Twelve does it:

    <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->

    you could integrate something similar into your theme and copy the corresponding file from Twenty Twelve or from http://themes.svn.wordpress.org/twentytwelve/1.1.1/js/html5.js

    Hi guys,

    The “nav” tip did the trick! Renamed <nav> to <div id="nav"> and all was well.
    Turns out that I also don’t need the respond.js plugin.

    How long can it take to fix such a ‘mistake’… 🙂

    Thanks a lot!

    P.S. @alchymyth: will still have a look at the Twenty Twelve theme. So also thanks for that tip.

    Oops. Too fast (didn’t re-cache Internet Explorer)…

    Turns out that:
    1. I do need the plugin and
    2. that the menu images align to the right of the site… Any ideas on this problem?

    Just added the html5.js file to my theme and the reference to it from the header.php file. This fixed the alignment of my menu images to the complete right of the website.

    Again thanks, and turned out that I needed ALL of your solutions. 🙂

    topic closed!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] IE7/8 problem menu navigation with images’ is closed to new replies.