html - How to target only numbers in a list containing both numbers and alphabets? -
here list items:
<ul class="col2"> <li>from $400</li> <li>from $1000</li> <li>sold out</li> <li>from $1400</li> </ul>
now want want format numbers ($200,$1000 , $1400) following: droid serif, bold, 36px, #1c1819
and words(from , sold out) following: open sans, bold, 22px, #726850
is there way can it?
with html , css need element, in case recommend use <span>
:
.col2 li { font: bold 22px"open sans"; color: #726850; } .col2 li span { font: bold 36px"droid serif"; color: #1c1819 }
<ul class="col2"> <li>from <span>$400</span></li> <li>from <span>$1000</span></li> <li>sold out</li> <li>from <span>$1400</span></li> </ul>
Comments
Post a Comment