Unordered list coming out of the div

Discussion in 'CSS' started by Notting, Feb 11, 2008.

  1. #1
    Notting, Feb 11, 2008 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well first, I have no idea why, but I always need to reset my list margins and paddings even after the * reset...

    After that, looking at the page in m y crappy old browser with no fonts, it looks like there really isn't enough room for the bullets. Like, you'd have to make #details wider, or the font smaller (which you don't want).

    In the meantime, you could try list-style-position: inside; which moves the bullets right up against the first word (no matter what padding you set... this can look pretty bad in IE I think it is... too close to the first word I think).

    Next trick could be to set the text-align to the right, to help make room for the bullets.

    Otherwise, setting the padding and margins on the li's to zero... you really have to look at them in all browsers, cause it always looks okay in one and crap in another.

    I usually have this in my css:
    * {
    margin: 0;
    padding: 0;
    }
    ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
    }

    Of course since you want the bullets you wouldn't have the list-style:none thing. But it's the only way I can guarentee no margins or paddings left on the lists.
     
    Stomme poes, Feb 11, 2008 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    Have you changed the page? I see no ul in #details.

    cheers,

    gary
     
    kk5st, Feb 11, 2008 IP
  4. Notting

    Notting Notable Member

    Messages:
    3,210
    Likes Received:
    335
    Best Answers:
    0
    Trophy Points:
    280
    #4
    Yeah I trid a few more things then removed the ul and just used brs!

    Cheers
    Notting
     
    Notting, Feb 12, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well now wait a minute, the ul was the better idea... with the br's, you don't have the bullets... so, why not just keep the (more semantic) ul and remove the bullets?

    ul, li {
    list-style: none;
    }

    Viola.
     
    Stomme poes, Feb 12, 2008 IP