WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't get sidebar lists to align left. (9 posts)

  1. Kustem
    Member
    Posted 5 years ago #

    Hi there,

    I am trying to get the lists of links in my websites left sidebar to align further to the left but all the different things I have tried have no effect. The links all stay centred. I am guessing that maybe there is a value that has to be defined or altered but I can't seem to find any code in my style.css that refers to the sidebars text formatting. I am pretty new to css so that probably doesn't help things. Also I have thought that it may have something to do with the sidebars margin or padding but through trial and error I haven't been able to alter it.

    If anyone could point me to a guide or provide some insight into what I should be changing or adding to style.css that would be very much appreciated.

    Thanks

  2. figaro
    Member
    Posted 5 years ago #

    A link to your site will help us help you.

  3. Kustem
    Member
    Posted 5 years ago #

    Here is the link to my website.

    Website

    The popular searches links are the ones which are giving me trouble as they either pass through the sidebar or wrap depending on which browser you use. So I would like them to be closer to the left to give them room.

    They are all linked to the same page just to test them.

  4. figaro
    Member
    Posted 5 years ago #

    Okay, I'm not a css expert, so I can't guarantee this won't impact something else, so try it and then test to make sure it doesn't negatively impact something else.

    Find the following code in style.css

    .alignleft { float:left; list-style-image: url(images/B.gif); list-style-position: outside; }

    and change it by adding margin values like this:

    .alignleft { float:left; list-style-image: url(images/B.gif); list-style-position: outside; margin: 0 0 0 -50px}

    I'm sure there is a better way, but that's the best I can suggest.

  5. bekabug
    Member
    Posted 5 years ago #

    They aren't actually "centered" there is so much default padding and margins on an unordered list that it just looks that way.

    try inserting this into your CSS:

    ul {
    padding-left: 0px;
    }

    You should see that it flattens your lists there all the way to the left. Now you can adjust it from there to your liking. :)

    Also, since you're new to CSS you may want to investigate a plugin for Firefox called Firebug and do some research on performing a CSS reset.

    Some people hate using CSS reset because it makes more work for them but if you throw a reset in temporarily when you're having a problem you can't wrap your head around and it fixes it... you know you have a default styling conflict.

  6. bekabug
    Member
    Posted 5 years ago #

    null

  7. bekabug
    Member
    Posted 5 years ago #

    why are my posts not showing up??

  8. bekabug
    Member
    Posted 5 years ago #

    null

  9. bekabug
    Member
    Posted 5 years ago #

    null

  10. bekabug
    Member
    Posted 5 years ago #

    null

  11. bekabug
    Member
    Posted 5 years ago #

    sweet merciful crap... how did that happen? sorry man...

  12. Kustem
    Member
    Posted 5 years ago #

    Lol Bekabug thats quite a lot of spam there =P No worries though. Thank you both for the help. Will try those suggestions out and see what happens.

  13. figaro
    Member
    Posted 5 years ago #

    Also, since you're new to CSS you may want to investigate a plugin for Firefox called Firebug

    Second that recommendation...I'd be lost without it.

  14. Kustem
    Member
    Posted 5 years ago #

    All sorted now. Thanks very much.

Topic Closed

This topic has been closed to new replies.

About this Topic