Support » Themes and Templates » How to Not Indent Lists in Links sidebar

  • 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 {
    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • In WP speak those would be in #menu ul etc.

    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.

    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.

    Huh. Back after a month. I’ve since implemented it differently:

    That seems to work fine.

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Not Indent Lists in Links sidebar’ is closed to new replies.