So i have list of items and im using list-style: decimal;
but i want to add border to only for li
also for that decimal. This is my fiddle: https://jsfiddle.net/zzzpLqwq/ Any suggestion?
Use list-style-position: inside
and the border
on the <li>
itself:
ul { list-style: decimal; display: inline-block; } li { background: red; list-style-position: inside; border-bottom: 1px solid #ccc; }
<ul> <li>First</li> <li>Second</li> <li>Thrid</li> </ul>
Your updated JSFiddle
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.