WordPress.org

Ready to get started?Download WordPress

Forums

Titles are getting inside ul li lists! (8 posts)

  1. Mijae
    Member
    Posted 8 years ago #

    <li id="linkcat-3"><h2>Category</h2>

    <ul>
    <li>link</li>
    <li>link</li>
    <li>link</li>
    <li>link</li>
    </ul>
    </li>

    Thats how my menues are being shown, but all the WP blogs I've checked show up as

    <h2>Category</h2>

    <ul>
    <li>link</li>
    <li>link</li>
    <li>link</li>
    <li>link</li>
    </ul>

    Which is how its supposed to work. I haven't edited any php files, only the templates. How do I make it work like it should?

  2. LiverpoolLad
    Member
    Posted 8 years ago #

    I've just had the exact same problem, but solved it on IE6 and FF, with the cursed IE7 beta worthless piece of junk it does not work, but I'm sick of IE7 and will not look at it until it is actually released.

    Anyway, what I done was add some Css for the li and make sure that the list shows 'none' for any bullet.

    Works like a charm

    Example below, alter to your own sidebar, if indeed you use it in the sidebar

    #sidebarright li {
    list-style-type: none;
    }

  3. Mijae
    Member
    Posted 8 years ago #

    But my problem is that the Titles are getting inside the ul/li tags when they should not!

    Edit: its a coding error, not browser-side. Take a look at my first post to see the difference.

  4. LiverpoolLad
    Member
    Posted 8 years ago #

    A link would be useful

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Actually, every standard sidebar setup is like your first entry, not like your second.

    It's a matter of layers. The sidebar itself is usually one big unordered list. Each entry in the sidebar is then inside an item in that list. The title of the sidebar entry is in an H2, and if the sidebar element has a list of it's own, then it can.

    But yes, *usually* you want each sidebar element to be in one big LI. It makes things easier, in the long run.

  6. Mijae
    Member
    Posted 8 years ago #

    I can't post the URL due to it's content.

  7. LiverpoolLad
    Member
    Posted 8 years ago #

    Fair enough with the content.

    The actual H2 is in an li id, I'm not really 100% sure what that means, but my h2's had bullets, and only when I made the css for an li on its own (with no ul or ol), did the h2 stop having the bullet.

    Still, live and learn eh?

  8. Mijae
    Member
    Posted 8 years ago #

    Well, I changed the wp_list_links to wp_get_links (for each category), and used <h2><?php _e('Title'); ?></h2> for each title and got to look it like I wanted it to!

    Thanks for making me think :P

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.