treehouse : what would you like to learn today?
Web Design Web Development iOS Development

in decimal , is it possible ?

  • i need this type of list .(in decimal). i've tried all the types of ol. i want to set a huge list of this type

    1.1 apple
    1.2 mango
    1.3 tomato


    is it possible automatically throgh css. otherwise i will do this shitty job manually.
  • HTML

    <ol>
    <li>one</li>
    <li>two</li>
    <li>
    <ol>
    <li>three</li>
    <li>four</li>
    </ol>
    </li>
    </ol>


    you can make up your own CSS, I would give the li classes like top-level, sub-level so you can move the li back a bit to make it look like 3.1

    instead of
    3.          1. Three


    EDIT: I just played around to show you it can be done, not making your list up for you, hopefully you can see where I am going and amend it to your situation