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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS Ordered Lists using Right Parentheses

    Hi,

    I want to be able to have an ordered list that use right parentheses instead of periods.


    Here is the css I employed.

    Code:
    .ui-tabs-panel ol li {
      list-style: none;
     counter-reset: list;
    }
    .ui-tabs-panel ol li:before {
      content: counter(list, decimal) ") ";
      counter-increment: list;
    font-size: 14px;
    font-weight: bold;
    font-family: arial;
    color: #222222;
    
    }

    When I use it, the numbered list does not iterate and instead comes out as

    1)
    1)
    1)

    instead of

    1)
    2)
    3)

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello jagwebby,
    Look at it this way -
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    html, body {
    	margin: 0;
    	background: #FC6;
    }
    #container {
    	width: 800px;
    	margin: 30px auto;
    	background: #999;
    	overflow: auto;
    }
    ol {counter-reset: item;}
    ol li {
    	list-style: none;
    }
    ol li:before {
    	content: counter(item) ") ";
    	counter-increment: item;
    	font-size: 14px;
    	font-weight: bold;
    	font-family: arial;
    	color: #222222;
    }
    
    </style>
    </head>
    <body>
        <div id="container">
        	<ol>
            	<li>one</li>
                <li>two</li>
                <li>three</li>
            </ol>
        <!--end container--></div>
    </body>
    </html>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks that was a big help!


  •  

    Posting Permissions

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