• Resolved York

    (@york)


    I’ve created a CSS/javascript drop down menu that works on its own in Firefox and IE6, and within a WP header.php template in Firefox, but not in IE.

    See the drop down menu only page. (works in FF and IE6)

    See the drop down menu in WP page. (works in FF, but not IE6)

    Both pages reference the same CSS stylesheet, so I feel confident that it is not a CSS issue.

    Perhaps it’s a javascript/PHP issue? I’ve read the support page on javascript, but found no solution.

    Any ideas or advice would be appreciated.

    Thanks,

    York

Viewing 7 replies - 1 through 7 (of 7 total)
  • Doodlebee

    (@doodlebee)

    You’re not calling them in the same…

    IN the “working” page (no WordPress), you’re calling it in with a simple <link rel="... stylesheet call.

    In the non-working, you’re calling it in with <style type="text/css"><!-- @import...

    Get rid of the link within the style tag and the @import stuff, and just call it in with the <link> method – see if that helps.

    Root

    (@root)

    It might be a variation in your DTD.

    Doodlebee

    (@doodlebee)

    yep – could be that, too. And does your WordPress site validate? that could contribute as well.

    Thread Starter York

    (@york)

    Thanks for your input.

    I had previously tried replacing

    <style type="text/css" media="screen">
    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->
    </style>

    with

    <link rel="stylesheet" type="text/css" href="https://www.yorkrules.com/yorkrules3/wordpress/wp-content/themes/blue-zinfandel-enhanced-20/style.css">

    But that had no effect, so I returned to the @import method.

    I also included the link to the javascript that’s used in the navbar, but again, without success.

    The theme’s XHTML was not valid, but per doodlebee’s suggestion, I made the necessary changes, and now it is – still, no success.

    Root, would you clarify for me your thoughts on the DTD?

    Also, could the javascript links in my header be in the wrong place, or is there some other syntax error I’ve missed?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head profile="https://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="distribution" content="global" />
    <meta name="robots" content="follow, all" />
    <meta name="language" content="en, sv" />
    
    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <!-- leave this for stats please -->
    
    <link rel="Shortcut Icon" href="<?php echo get_settings('home'); ?>/wp-content/themes/blue-zinfandel/images/favicon.ico" type="image/x-icon" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php wp_head(); ?>
    <script type="text/javascript" src="https://www.yorkrules.com/yorkrules3/global/js/p7exp.js"></script>
    <!--[if lt IE 7]>
    <script defer type="text/javascript" src="https://www.yorkrules.com/yorkrules3/global/js/pngfix.js"></script>
    <![endif]-->
    <style type="text/css" media="screen">
    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->
    </style>
    </head>

    Thank you for your continued assistance.

    Root

    (@root)

    As I thought. You did not take my hint. ?? The one which works has a DTD of xhtml strict. The one which doesnt uses transitional.

    Thread Starter York

    (@york)

    I did not include onload="P7_ExpMenu()" in the body tag.

    The page now works properly with the following code:
    `
    <?php if (is_category(1)) { ?> <body id=”indexPage” onload=”P7_ExpMenu()”>
    <?php } else if (is_category(4)) { ?> <body id=”learnPage” onload=”P7_ExpMenu()”>
    <?php } else if (is_category(3)) { ?> <body id=”lookPage” onload=”P7_ExpMenu()”>
    <?php } else if (is_category(5)) { ?> <body id=”playPage” onload=”P7_ExpMenu()”>
    <?php } else if (is_category(7)) { ?> <body id=”readPage” onload=”P7_ExpMenu()”>
    <?php } else if (is_category(8)) { ?> <body id=”sharePage” onload=”P7_ExpMenu()”>
    <?php } else if (is_category(9)) { ?> <body id=”shopPage” onload=”P7_ExpMenu()”>
    <?php } else { ?> <body id=”indexPage” onload=”P7_ExpMenu()”> <?php } ?>

    Thanks to all the members who offered their assistance on this issue.

    Root

    (@root)

    Well I am glad it works but that is a butt ugly solution. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Drop down menu works everywhere but WP in IE6’ is closed to new replies.