Revised Answer: jsFiddle Pure CSS Solution
Here is a revised method that does not use the OP's original jQuery framework, a request that was not fulfilled in my previous answer. That method used existing jQuery to apply a span wrapper for the li
element since direct HTML modification was not possible.
This new method uses CSS Pseudo selectors :before
and :after
along with CSS 2.1 counter
function that can have it's number list stylized so that no jQuery wrapper is needed. In fact, the jsFiddle revision shows the numbers using Google @font-face font.
Using the CSS counter function is done by declaring a variable name to use in the ul
element, then incrementing the counter in the :before
element as well as using it as actual content.
Simple Example: jsFiddle CSS Counter
HTML:
<ul>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
<li>A numbered list that's stylized!</li>
</ul>
CSS:
ul{
list-style-type: none;
white-space: nowrap;
margin: 0;
padding: 0;
width: 210px;
height: 200px;
overflow: auto;
border: 3px solid royalblue;
/* Setup the counter. */
counter-reset: yourVariableName;
}
li:before{
/* Advance the number. */
counter-increment: yourVariableName;
/* Use the counter number as content. */
content: 'Item ' counter(yourVariableName) ': ';
color: royalBlue;
font-family: 'Impact';
}
More about CSS counters HERE.
My original dated answer that uses existing framework in OP's question is shown below.
I looked at your Question carefully and then looked at your webpage.
Here is the solution you need:
jsFiddle
To summarize, this are the replacement CSS Rules that make it work:
#secondary ol {
color:#F60;
margin-bottom:0;
margin-left: 0px; /* Since 'ul,ol{}' setting in line 108 affects this selector, 'margin-left' is redefined. */
list-style-position: inside; /* This will place the number on top and inside of the current color of li */
}
.notes{
color:#333;
width: 230px;
heigh: 50px;
display: inline-block;
vertical-align:text-top;
}
Result:
Extra: This variant example emphasizes the numbers: jsFiddle