daily pastebin goal
12%
SHARE
TWEET

CSS Code

a guest Jul 4th, 2014 517 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ul.rig {
  2.         list-style: none;
  3.         font-size: 0px;
  4.         margin-left: -2.5%; /* should match li left margin */
  5. }
  6. ul.rig li {
  7.         display: inline-block;
  8.         padding: 10px;
  9.         margin: 0 0 2.5% 2.5%;
  10.         background: #fff;
  11.         border: 1px solid #ddd;
  12.         font-size: 16px;
  13.         font-size: 1rem;
  14.         vertical-align: top;
  15.         box-shadow: 0 0 5px #ddd;
  16.         box-sizing: border-box;
  17.         -moz-box-sizing: border-box;
  18.         -webkit-box-sizing: border-box;
  19. }
  20. ul.rig li img {
  21.         max-width: 100%;
  22.         height: auto;
  23.         margin: 0 0 10px;
  24. }
  25. ul.rig li h3 {
  26.         margin: 0 0 5px;
  27. }
  28. ul.rig li p {
  29.         font-size: .9em;
  30.         line-height: 1.5em;
  31.         color: #999;
  32. }
  33. /* class for 2 columns */
  34. ul.rig.columns-2 li {
  35.         width: 47.5%; /* this value + 2.5 should = 50% */
  36. }
  37. /* class for 3 columns */
  38. ul.rig.columns-3 li {
  39.         width: 30.83%; /* this value + 2.5 should = 33% */
  40. }
  41. /* class for 4 columns */
  42. ul.rig.columns-4 li {
  43.         width: 22.5%; /* this value + 2.5 should = 25% */
  44. }
  45.  
  46. @media (max-width: 480px) {
  47.         ul.grid-nav li {
  48.                 display: block;
  49.                 margin: 0 0 5px;
  50.         }
  51.         ul.grid-nav li a {
  52.                 display: block;
  53.         }
  54.         ul.rig {
  55.                 margin-left: 0;
  56.         }
  57.         ul.rig li {
  58.                 width: 100% !important; /* over-ride all li styles */
  59.                 margin: 0 0 20px;
  60.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top