Grow your CSS skills. Land your dream job.

ordered list – numbers appearing outside div

  • # August 17, 2010 at 9:02 am

    Hi
    I’m using a vertical ordered list in a left column to create a navigation list.

    Very simple and normal list code:

    but the numbers are appearing to the left outside of the left column div and even the main container/wrapper div.
    The list itself and it’s coloured background div block is inside the left column div as I’d expect as that’s where I’ve put it! Not sure why the whole list isn’t bumped to the right a few pixels so that the numbers are inside the left column div as well as the words.

    The left column div is wide enough to accommodate both the list and it’s numbers.

    # August 17, 2010 at 9:06 am

    As an experiment I’ve just shoved an ordered list in the right column – again the numbers are not inside the right column div but jut a few pixels into the middle column (3 column layout)

    # August 17, 2010 at 10:56 am
    Code:
    li {list-style: circle inside}

    or you could

    Code:
    ol {margin:0 0 0 10px;}
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".