WordPress.org

Ready to get started?Download WordPress

Forums

How to Not Indent Lists in Links sidebar (6 posts)

  1. justinbaeder
    Member
    Posted 10 years ago #

    WordPress renders the links sidebar as an unordered list. This is cool for reasons that are esoteric and weighty, but the bottom line is it's a pain if you don't like stuff being indented in your sidebar. Personally, I don't know why you would want to indent things in an already-skinny sidebar. To each his own, though.
    Other posts here have suggested setting list-type:none, but that'll only remove the bullet points. It won't change the indentation.
    Courtesy of ALA and some testing with WP I did, here's the code you need to un-indent your links bar:
    #links ul {
    list-style: none;
    margin-left: 0;
    padding-left: 1em;
    text-indent: -1em;
    }#links ul ul {
    margin-left:0;
    list-style: none;
    padding-left: 1em;
    text-indent: -2em;
    }

    IE and Mozilla interpret padding and indents differently; this way accomodates for both. I have tested this method on Firefox and IE, but I don't know about Safari.

  2. Root
    Member
    Posted 10 years ago #

    In WP speak those would be in #menu ul etc.

  3. MarkMichon
    Member
    Posted 10 years ago #

    Problem with your code that may come into play is text-indent only effects the first line. If you have links/descriptions this may pose a problem. Don't see why a simple margin:0; padding: 0; would not suffice.

  4. Root
    Member
    Posted 10 years ago #

    I am sorry but the first post has misinterpreted the ala article which incidentally is well worth reading. The text indent malrkey is needed when you want to not only unstyle the bullets but then add an image. That addresses Marks point as well.

  5. justinbaeder
    Member
    Posted 10 years ago #

    Huh. Back after a month. I've since implemented it differently:
    margin:0;
    padding:0;
    list-style:none;
    text-indent:0;

    That seems to work fine.

  6. gregorsmith
    Member
    Posted 9 years ago #

    Call me crazy, but instead of all that stuff, I just went into the wp-includes/links.php file and stripped out the list items there, same with archives list too

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.