改訂された回答: jsFiddle Pure CSS ソリューション
これは、OP の元の jQuery フレームワークを使用しない改訂された方法です。これは、以前の回答では満たされなかった要求です。li
HTML を直接変更することはできなかったため、この方法では既存の jQuery を使用して要素にスパン ラッパーを適用していました。
この新しいメソッドは、CSS 疑似セレクター:before
と:after
CSS 2.1counter
関数を使用して、jQuery ラッパーが不要になるように番号リストを様式化できます。実際、jsFiddle リビジョンでは、Google の @font-face フォントを使用して数字が表示されます。

CSS カウンター関数を使用するには、要素で使用する変数名を宣言し、ul
要素内のカウンターをインクリメントし、:before
それを実際のコンテンツとして使用します。
簡単な例: jsFiddle CSS カウンター

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';
}
CSS カウンターの詳細については、こちらをご覧ください。
OPの質問で既存のフレームワークを使用する私の元の日付付きの回答を以下に示します。
私はあなたの質問を注意深く見てから、あなたのウェブページを見ました。
必要なソリューションは次の
とおりです。
要約すると、これを機能させる代替 CSS ルールは次のとおりです。
#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;
}
結果:

おまけ:この変種の例は数字を強調しています: jsFiddle