WordPress.org

Ready to get started?Download WordPress

Forums

How To Stop Lists From Indenting (13 posts)

  1. 5thape
    Member
    Posted 8 years ago #

    If you go to my site you'll see that my links and comments are indented. I think in place of bullets it's just indenting everything. Is there anyway I can get around this? I removed the bullets by putting list-style-type: 0; in my CSS. Maybe there is a more professional way?

  2. TonyGeer
    Member
    Posted 8 years ago #

    Hi, in your CSS stylesheet, you can do something like this:

    ol.commentlist {
    margin-left:0;
    }

    This should remove the left indentation from your comments list.

  3. 5thape
    Member
    Posted 8 years ago #

    Thanks Tony but it doesn't work.

  4. Chris_K
    Member
    Posted 8 years ago #

    try changing ol to ul.

  5. vkaryl
    Member
    Posted 8 years ago #

    Truthfully, there's nothing "unprofessional" about setting the list-style or list-style-type to "0" or "none". Works fine, and is perfectly valid, and if it gave you the look you want, don't worry about it.

  6. 5thape
    Member
    Posted 8 years ago #

    Actually the problem why I think it's not professional is because it doesn't work. Yeah, it got rid of my bullets but it's still indenting my lists. Check out my links page to see what I mean. I want my lists to be aligned to the left side of the page like all my headings and content.

  7. Kafkaesqui

    Posted 8 years ago #

    5thape, try this:

    #content ul, #content li {
    list-style-type: none;
    padding-left: 0;
    }

  8. moshu
    Member
    Posted 8 years ago #

    On that particular page (Links) there are several problems:
    The template tag spits out "li id" for every link category
    (e.g. <li id="linkcat-6">) and those are not styled;
    and the links themselves are embedded lists inside those.
    Furthermore the <ul> tag is missing on the page at the beginning, so it gives errors, too... besides not "listening" to the instructions of the stylesheet.

  9. 5thape
    Member
    Posted 8 years ago #

    Kafka, thanks so much that solved the problem.

    Moshu, I think the problem might come from my links.php in my wp-includes folder. At the bottom of that file is all the script for the get_links_list command which I use to display my links. In my links.php file in my theme folder I've added opening and closing ul tags and that got rid of 7 out of 14 XHTML errors:

    < ul ><?php get_links_list(); ?> < /ul >

    All the rest of the 7 errors say that "element 'linkcat' undefined". What could I do to fix that? Thanks.

  10. moshu
    Member
    Posted 8 years ago #

    I use the same template tag on a link page, but... your output is different:

    <li id="linkcat-6"><linkcat>Film & TV</linkcat>

    The validator doesn't like those <linkcat></linkcat> things - which I have no idea where are coming from.
    WP generates (I think) only the
    id="linkcat-6"
    part. So, how did you get those strange "tags"?

  11. 5thape
    Member
    Posted 8 years ago #

    lol I have no clue...I'm not proficient enough in PHP to start adding things and I'm usually very careful about not accidentally adding things. Do you think I should get a new links.php file and overwrite the one I have in my wp-contents folder?

  12. 5thape
    Member
    Posted 8 years ago #

    I think I found the problem. For some reason there was a <linkcat> tag inside the php, which you pointed out. I deleted it and it all validated correctly. Weird...

    Thanks for your help!

  13. moshu
    Member
    Posted 8 years ago #

    edit.
    Glad it worked out.

Topic Closed

This topic has been closed to new replies.

About this Topic