Advertisement
jaytel

CSS-Grid-layout

May 16th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. # HTML
  2.  
  3. <div class="wrapper">
  4. <div class="box a">A</div>
  5. <div class="box b">B</div>
  6. <div class="box c">C</div>
  7. <div class="box d">D</div>
  8. <div class="box e">E</div>
  9. <div class="box f">F</div>
  10. </div>
  11.  
  12. # CSS
  13.  
  14. body {
  15. margin: 40px;
  16. }
  17.  
  18. .wrapper {
  19. display: grid;
  20. grid-template-columns: 100px 100px 100px;
  21. grid-gap: 10px;
  22. background-color: #fff;
  23. color: #444;
  24. }
  25.  
  26. .box {
  27. background-color: #444;
  28. color: #fff;
  29. border-radius: 5px;
  30. padding: 20px;
  31. font-size: 150%;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement