grid.css 801 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* grid container */
  2. .container {
  3. height: 100vh;
  4. display: grid;
  5. grid-template-columns: 1fr;
  6. grid-auto-rows: minmax(150px, auto);
  7. grid-gap: 10px;
  8. grid-template-areas:
  9. 'header'
  10. 'nav'
  11. 'main'
  12. 'aside'
  13. 'footer';
  14. }
  15. @media (min-width: 768px) {
  16. .container {
  17. grid-template-columns: 1fr 2fr 1fr;
  18. grid-template-rows: 100px minmax(150px, auto) 100px;
  19. grid-template-areas:
  20. 'header header header'
  21. 'nav main aside'
  22. 'footer footer footer';
  23. }
  24. }
  25. @media (min-width: 992px) {
  26. .container {
  27. grid-template-areas:
  28. 'header header header'
  29. 'nav main aside'
  30. 'nav footer footer';
  31. }
  32. }
  33. header {
  34. grid-area: header;
  35. }
  36. nav {
  37. grid-area: nav;
  38. }
  39. main {
  40. grid-area: main;
  41. }
  42. aside {
  43. grid-area: aside;
  44. }
  45. footer {
  46. grid-area: footer;
  47. }