
Untitled
By: a guest on
Aug 1st, 2012 | syntax:
None | size: 0.79 KB | hits: 9 | expires: Never
CSS: How to produce rounded boxed list
<ul>
<li>
<img src="http://www.placekitten.com/16/16">
Item 1
<span>1</span>
</li>
<!-- More list items -->
</ul>
/* Container with border and rounded corners */
ul {
border: 1px solid #ccc;
width: 200px;
/* Border radius for Chrome, Webkit and other good browsers */
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-border-radius: 10px;
border-radius: 10px;
}
/* Only add border to bottom of <li> */
li {
padding: 10px;
border-bottom: 1px solid #ccc;
}
/* Get rid of the last <li>'s bottom border to stop overlap with <ul>'s border */
/* :last-child works in IE7+ */
li:last-child {
border-bottom: none;
}
/* Get the number and float it right */
span {
float: right;
}