Support » Themes and Templates » Is this correct way to link to the stylesheet of a CSS menu?

  • I wish to implement a menu in my footer. It is a CSS list-based menu (with a javascript for IE6).

    Is this how I call the menu’s stylesheet in the header? If so, why doesn’t the menu look right on my site?

    <link rel="stylesheet" media="all" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/skeleton_up/skeleton_up.css">

    Can I paste the bits in the menu-specific stylesheet into the theme’s stylesheet? How do I ensure there are no conflicts with the menu’s stylesheet?

    Thanks
    /p

Viewing 6 replies - 1 through 6 (of 6 total)
  • Where is the CSS file you’re attempting to link, relative to your Theme’s root directory?

    Thread Starter pullman

    (@pullman)

    Thanks for replying Chip. It is in a subfolder called “skeleton_up” in the theme folder.

    cheers
    /p

    This link returns a 404 (i.e. there is no stylesheet named “skeleton_up.css” at this location):

    http://philipus.com/wp-content/themes/f8-lite/skeleton_up/skeleton_up.css

    Are you sure this path is correct?

    Found the problem: you’ve mis-named the CSS file.

    It’s “skeleton.css”, not “skeleton_up.css”:
    http://philipus.com/wp-content/themes/f8-lite/skeleton_up/skeleton.css

    Change your link to the following:

    <link rel="stylesheet" media="all" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/skeleton_up/skeleton.css">

    (Or, better yet:)

    <link rel="stylesheet" media="all" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/skeleton_up/skeleton_up.css">

    Thread Starter pullman

    (@pullman)

    Oh my I feel a fool. I made a mistake when editing the header file that I didn’t see that I typed skeleton_up.css when in fact the file is only called skeleton.css.

    Abject apologies for having wasted your time like this. I do appreciate your help. I guess sometimes one needs an extra pair of eyes to actually see!

    Best
    /p

    Oops, make that:

    <link rel="stylesheet" media="all" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/skeleton_up/skeleton.css">

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is this correct way to link to the stylesheet of a CSS menu?’ is closed to new replies.