WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How use the CSS option in the Appearance > Menus? (2 posts)

  1. vytaulla51
    Member
    Posted 3 years ago #

    Hi!
    I have designed my own theme and yesterday got some help with enabling the menu building capability in WP 3.1 so now that's running. I typically build HTML/CSS websites so I'm used to simply designing and coding navbars as discrete entities, so it's not obvious to me how to style a menu from within the WP admin.

    Here's my original HTML/CSS. It's a horizontal menu with a couple of dropdowns (used a javascript for the drops). Here's the code:

    <div id="navbar">
                       <ul>
                           <li><a href="(EmptyReference!)">Home</a></li>
                        <li><span class="white">|</span></li>
                            <li><a href="(EmptyReference!)">Web Services</a>
                            <ul>
                                <li><a href="(EmptyReference!)">Website Samples</li>
                                <li><a href="(EmptyReference!)">Web Marketing</li>
                                </ul>
                            </li>
                            <li><span class="white">|</span></li>
                            <li><a href="(EmptyReference!)">Print Design</a>
                            <ul>
                                <li><a href="(EmptyReference!)">Business Identity</li>
                                <li><a href="(EmptyReference!)">Print Collateral</li>
                                </ul>
                            </li>
                            <li><span class="white">|</span></li>
                        <li><a href="(EmptyReference!)">SEO & SEM</a></li>
                        <li><span class="white">|</span></li>
                        <li><a href="(EmptyReference!)">Social Media</a></li>
                        <li><span class="white">|</span></li>
                        <li><a href="(EmptyReference!)">Podcasts</a></li>
                        <li><span class="white">|</span></li>
                        <li><a href="(EmptyReference!)">Articles</a></li>
                        <li><span class="white">|</span></li>
                        <li><a href="(EmptyReference!)">Blog</a></li>
    
    </ul>

    That works perfectly if I just create a navbar.php template and call it via <?php include (TEMPLATEPATH . "/navbar.php"); ?>

    In other words, it applies the entire group of styles and includes white hash marks and spacing between the page titles.

    How do I get that to work with the WP menu building option? I see the text boxes that say "CSS Classes, optional" but I don't see what I would enter in those. They treat the menu items separately while I'm used to building an entire navbar and having code apply to the entirety of it.

    I tried to find a sample in the codex or instructions but failed. I couldn't find anything specific.

    Help!
    Thanks!!

  2. vytaulla51
    Member
    Posted 3 years ago #

    First, I posted the wrong code up there - should have been my CSS code not the html.

    Second, I think I'm working this out and have posted a question in the plugins and hacks thread. So I'm closing this out.

Topic Closed

This topic has been closed to new replies.

About this Topic