css selectors - How to target CSS class names that start with digit -
i have list class want apply top margin - seems syntax invalid css. don't think likes 1200mm-x-4700mm
section.
i cannot rename list class automatically generated. there way around allow me apply css styling?
<li class="max-panel-size 1200mm-x-4700mm">...</li>
li.max-panel-size.1200mm-x-4700mm { margin-top: 20px; }
in html5, css class names can contain (and start with) character. however, in order target fancy css class names inside css files (or javascript functions) you need escape them.
li.max-panel-size.\31 200mm-x-4700mm { background: #f00; } li.max-panel-size.\31 111mm-x-1111mm { background: #0f0; } li.max-panel-size.\39 999mm-x-9999mm { background: #00f; }
<ul> <li class="max-panel-size 1200mm-x-4700mm">test 1</li> <li class="max-panel-size 1111mm-x-1111mm">test 2</li> <li class="max-panel-size 9999mm-x-9999mm">test 3</li> </ul>
you use css2 [att~=val]
selector well.
Comments
Post a Comment