Treehouse: Grow your CSS skills. Land your dream job.

Why is my unordered list not sitting to the left?

  • # August 7, 2011 at 3:42 am


    I have an eBay listing that I’m creating and it’s almost done, but I want the .mini_nav to align left within it’s div and it is floating in the middle.

    Here is a link:

    and a picture:

    Bad UL

    Any help would be appreciated,

    # August 7, 2011 at 5:47 am

    there is patting on the UL class=”mini”, remove it then set clear: both on the LI’s.

    # August 7, 2011 at 11:50 am

    I’m not sure what padding you are referring to. If I set clear: both on the LI’s it messes with my top UL. Can you paste which padding you see, because I don’t see it?

    # August 7, 2011 at 12:03 pm

    “User Agent” styling. See, Chris linked to it a while back;

    A browsers has some preset styles already. A reset will remove all/most of them. Be wary however as if you have been marking up without a reset other things can/will change.

    Get a Reset -> drop the ‘float: left’ from ‘.mini li’, ‘.mini a’ and ‘ul li’. You little menu will look just right, but a lot of other things will appear incorrect (main menu and a lot of other positioning).

    I believe there are still a few basics you need to cover with HTML / CSS. You may be using a few too many floats :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.