Advertisement
srikat

Untitled

Dec 16th, 2013
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. 3-columns
  2.  
  3. 3x + 2g = 700
  4. g stands for gap.
  5.  
  6. #featured-post-6 article {
  7. width: 31.428571428571%; /* value of x */
  8. }
  9.  
  10. #featured-post-6 article:nth-of-type(3n+1),
  11. #featured-post-6 article:nth-of-type(3n+2) {
  12. float: left;
  13. margin-right: 2.857142857143%; /* value of g */
  14. }
  15.  
  16. #featured-post-6 article:nth-of-type(3n+0) {
  17. float: right;
  18. }
  19.  
  20. 4-columns
  21.  
  22. 4x+3g = 880
  23. Let's say g = 20px
  24. x = 205
  25.  
  26. .below-home-featured .entry {
  27. border-bottom: none;
  28. width: 23.2954545455%;
  29. }
  30.  
  31. .below-home-featured .entry:nth-of-type(4n+1),
  32. .below-home-featured .entry:nth-of-type(4n+2),
  33. .below-home-featured .entry:nth-of-type(4n+3) {
  34. float: left;
  35. margin-right: 2.2727272727%;
  36. }
  37.  
  38. .below-home-featured .entry:nth-of-type(4n+0) {
  39. float: right;
  40. }
  41.  
  42. 4n+0: 0, 4, 8...
  43. 4n+1: 1, 5, 9, 14...
  44. 4n+2: 2, 6, 10...
  45. 4n+3: 3, 7, 11...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement