SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: ordered lists

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    MN
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ordered lists

    HTML Code:
    <ol style="display: inline; list-style-type: decimal;">
       <li>test</li>
       <li>test</li>
       <li>test</li>
    </ol>
    Does anyone know why this looks like this on screen?

    Code:
    1.      test
    1. test
    1. test
    See how it has that indent and it also does not change the current number.

    Do you know how this can be fixed?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    depends entirely on the browser, and perhaps other style declarations (margin, padding, etc., on the OL, LI, or OL LI)

    compare this test page by eric meyer in variuous browsers

    if you don't need "decimal" i would just remove that part, as that's the default, at least in internet explorer

    what's the "inline" for?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The problem is as r937 pointed out in that you are using display inline. Take it out and everything will be fine .

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •