Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    how to make sub-list?

    Dear All

    I know how to make an ordered or un-ordered list using <ol> or <ul>, such as:

    <ol>
    <li>Something</li>
    <li>SomeOtherThing</li>
    </ol>

    However, if I want to make a list like following:

    1. Something
    1.1 Something_1
    1.2 Something_2
    2. SomeOtherThing
    2.1 SomeOtherThing_1
    2.2 SomeOtherThing_2

    What html/css code should I use?

  • #2
    New Coder
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <ul>
    			<li>Something</li>
    			<li>
    				<ul>
    					<li>Something</li>
    					<li>Something</li>
    					<li>Something</li>
    			   </ul>
    		  </li>
    			<li>Somethingg</a>
                    <ul>
                    <li>Something</li>
                    </ul>
              </li>
    			<li>Something</li>
    		</ul>

  • #3
    New Coder
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thats 1 simple way to do it.

  • #4
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    thank you for your help.
    Unfortunately, your codes do not seem to work.

  • #5
    New Coder
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by littlestone View Post
    thank you for your help.
    Unfortunately, your codes do not seem to work.
    Well.. Its working for me, in FF, IE, Chrome.. I dont know what ur doing wrong, but its the right code.

  • #6
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,928
    Thanks
    46
    Thanked 203 Times in 202 Posts
    Quote Originally Posted by sejmno View Post
    Well.. Its working for me, in FF, IE, Chrome.. I dont know what ur doing wrong, but its the right code.
    actually it's not, or at lewast not for what OP is asking... look at attached screen shot... he needs to use
    Code:
    <ol>
    <li> one </li>
      <ol>
        <li> sub one one </li>
        <li> sub one two </li>
      </ol>
    <li> two </li>
      <ol>
        <li> sub two one </li>
        <li> sub two two </li>
      </ol>
    <li> three </li>
    </ol>
    to acheive what he wants... my code is before, your code is demo'd after
    Attached Thumbnails Attached Thumbnails how to make sub-list?-limenus.png  

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #7
    New Coder
    Join Date
    Jul 2011
    Location
    Denmark
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, i misunderstood the request. I didnt think that the problem was Getting numbers instead of "dot's".

  • #8
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you.

    I apologize for not explaining my question clearly. What I EXACTLYwant to achieve is:

    1. Title_1
    1.1 Title_1-1
    1.2 Title_1-2
    1.3 Title_1-3

    2. Title_2
    2.1 Title_2-1
    2.2 Title_2-2
    2.3 Title_2-3
    What html/css code can make them?


  •  

    Posting Permissions

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