WordPress.org

Ready to get started?Download WordPress

Forums

Is it possible to remove <li> in links? (5 posts)

  1. mtanner
    Member
    Posted 10 years ago #

    I've searched for this answer on the boards, but haven't found the answer I'm looking for. Is it possible to remove the

  2. * ul tags when using get_links_list() ? I guess this is more of a cosmetic thing than functionality but you can see what I mean here http://www.mauricetanner.com
  • paulzag
    Member
    Posted 10 years ago #

    I'm not sure about the get_links_list() I read it was hardcoded. That actually works quite well for me at http://www.wealthesteem.org/ The menu div headings are all ul tags. That's close to the default stylesheet.
    But have you tried modifying your stylesheet and adding to the correct sections
    list-style-type: none;
    hint look at the default wp-layout.css and you'll see
    #menu ul ul {
    font-variant: normal;
    font-weight: normal;
    line-height: 100%;
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: left;
    }

  • Alex King
    Member
    Posted 10 years ago #

    Yeah, we're trying to force semantic HTML on our poor unsuspecting users. :)

  • Dougal Campbell
    Member
    Posted 10 years ago #

    Wicked, aren't we? There have been lots of things written about semantic markup, so I won't bother trying to recap the argument here again. Let's just say that as more and more people learn how to use "semantically correct" HTML and then use CSS to style it, the better off the web will be.
    But if you don't have time to relearn everything right now, and want to continue using your table-based layout, you can still make it work. As mentioned above, you can just add some ul/li rules to your CSS to get rid of the bullets and indents. However, you might want to use lists in some of your posts, so you probably want to target things more narrowly. I suggest adding an attribute to the table which contains your Categories and links, like 'id="menutable"'. Then add the following rules to your CSS:
    <pre>
    table#menutable {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: left;
    }
    </pre>
    That should fix up the links in the top section of your page without affecting any bulleted lists that you might want to include in your posts.

  • Dougal Campbell
    Member
    Posted 10 years ago #

    Oops, forgot to go back and edit that CSS rule... That should have been something more like:
    <pre>
    table#menutable ul li {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: left;
    }
    </pre>
    Again, that's after adding the 'menutable' id to the appropriate table tag.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.