WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] IE7/8 problem menu navigation with images (13 posts)

  1. assarino
    Member
    Posted 1 year ago #

    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!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You've a HTML4 doctype, yet you're using HTML5 elements. Amend that.

  3. assarino
    Member
    Posted 1 year ago #

    Done. Didn't fix my problem though...

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  5. assarino
    Member
    Posted 1 year ago #

    Plugin installed, but doesn't seem to work...

  6. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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.

  7. assarino
    Member
    Posted 1 year ago #

    Hi alchymyth,

    Removed the @media screen line but that also didn't help...

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  9. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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

  10. assarino
    Member
    Posted 1 year ago #

    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.

  11. assarino
    Member
    Posted 1 year ago #

    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?

  12. assarino
    Member
    Posted 1 year ago #

    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. :-)

  13. assarino
    Member
    Posted 1 year ago #

    topic closed!

Topic Closed

This topic has been closed to new replies.

About this Topic