Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.79 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CSS: How to produce rounded boxed list
  2. <ul>
  3.     <li>
  4.         <img src="http://www.placekitten.com/16/16">
  5.         Item 1
  6.         <span>1</span>
  7.     </li>
  8.  
  9.     <!-- More list items -->
  10. </ul>
  11.        
  12. /* Container with border and rounded corners */
  13. ul {
  14.     border: 1px solid #ccc;
  15.     width: 200px;
  16.  
  17.     /* Border radius for Chrome, Webkit and other good browsers */
  18.     -webkit-border-radius: 10px;
  19.     -moz-border-radius: 10px;
  20.     -border-radius: 10px;
  21.     border-radius: 10px;
  22. }
  23.  
  24. /* Only add border to bottom of <li> */
  25. li {
  26.     padding: 10px;
  27.     border-bottom: 1px solid #ccc;
  28. }
  29.  
  30. /* Get rid of the last <li>'s bottom border to stop overlap with <ul>'s border */
  31. /* :last-child works in IE7+ */
  32. li:last-child {
  33.     border-bottom: none;
  34. }
  35.  
  36. /* Get the number and float it right */
  37. span {
  38.     float: right;
  39. }