ddeexxiikk

TI-LAB2-CSS

Oct 21st, 2025
998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.87 KB | Source Code | 0 0
  1. @charset "UTF-8";
  2.  
  3. html {
  4.     background: white;
  5. }
  6.  
  7. #kontener {
  8.     width: 90%;
  9.     margin: auto;
  10.     font-family: "Tahoma", "sans-serif";
  11.     font-size: 1rem;
  12. }
  13.  
  14. #naglowek {
  15.     width: 100%;
  16.     background: #ccc;
  17.     text-align: center;
  18.     padding: 0.5rem 0;
  19.     box-sizing: border-box;
  20. }
  21.  
  22. #naglowek h1 {
  23.     margin: 0;
  24.     padding: 1rem;
  25.     height: 100%;
  26.     display: flex;
  27.     align-items: center;
  28.     justify-content: center;
  29.     text-align: center;
  30.     font-size: clamp(1.5rem, 6vw, 3.5rem);
  31.     line-height: 1;
  32.     overflow: hidden;
  33.     box-sizing: border-box;
  34. }
  35.  
  36. #srodek {
  37. margin-top: 1rem;
  38. }
  39.  
  40. #stopka {
  41. background: #888;
  42. color: white;
  43. padding: 0.2rem;
  44. text-align: center;
  45. }
  46.  
  47. #menu {
  48.     width: 10rem;
  49.     float: left;
  50.     margin-right: 1rem;
  51. }
  52.  
  53. @media only screen and (min-width: 641px) {
  54.     .hamburger-button {
  55.         display: none;
  56.     }
  57.  
  58.     .menu-list {
  59.         display: block !important;
  60.     }
  61. }
  62.  
  63. #newsy {
  64.     background: #ddd;
  65.     padding: 0 0.3rem 0.3rem;
  66. }
  67.  
  68. #tresc {
  69.     background: #ccc;
  70.     text-align: justify;
  71.     padding: 0.5rem;
  72.     margin-left: 11rem;
  73.     margin-bottom: 1rem;
  74. }
  75.  
  76. #stopka {
  77.     clear: both;
  78.     background: #888;
  79.     color: white;
  80.     padding: 0.2rem;
  81.     text-align: center;
  82. }
  83.  
  84. .hamburger-checkbox {
  85.     position: absolute;
  86.     left: -9999px;
  87.     width: 1px;
  88.     height: 1px;
  89.     overflow: hidden;
  90. }
  91.  
  92. .hamburger-icon {
  93.     display: none;
  94.     flex-direction: column;
  95.     cursor: pointer;
  96.     padding: 10px 0;
  97.     background: #fff;
  98.     margin-bottom: 0.5rem;
  99.     border: 0;
  100.     align-items: center;
  101.     justify-content: center;
  102. }
  103.  
  104. .hamburger-icon span {
  105.     width: 30px;
  106.     height: 3px;
  107.     background-color: #333;
  108.     margin: 4px 0;
  109.     transition: 0.3s;
  110.     border-radius: 2px;
  111.     display: block;
  112. }
  113.  
  114. .menu-list {
  115.     display: block;
  116. }
  117.  
  118. .menu-list li {
  119.     list-style: none;
  120.     font-size: 90%;
  121. }
  122.  
  123. .menu-list a {
  124.     text-decoration: none;
  125.     color: black;
  126.     background: #eee;
  127.     padding: 0.3rem;
  128.     margin-bottom: 0.5rem;
  129.     display: block;
  130.     text-align: center;
  131.     transition: all 0.5s ease-in-out;
  132. }
  133.  
  134. .menu-list a:hover {
  135.     background: #888;
  136.     color: white;
  137. }
  138.  
  139. @media only screen and (max-width: 640px) {
  140.     #menu {
  141.         width: 100%;
  142.         padding: 0;
  143.     }
  144.  
  145.     #tresc {
  146.         margin-left: 0;
  147.         clear: both;
  148.     }
  149.  
  150.     #newsy {
  151.         text-align: center;
  152.         background: #aaa;
  153.     }
  154.  
  155.     #kontener {
  156.         min-width: 320px;;
  157.         width: 100%;
  158.     }
  159.  
  160.     .hamburger-icon {
  161.         display: flex;
  162.     }
  163.  
  164.     .menu-list {
  165.         display: none;
  166.         width: 100%;
  167.         padding: 0;
  168.         margin: 0.25rem 0;
  169.     }
  170.  
  171.     .hamburger-checkbox:checked + .hamburger-icon + .menu-list {
  172.         display: block;
  173.     }
  174.  
  175.     #menu ul {
  176.         margin: 0;
  177.         padding: 0;
  178.     }
  179. }
Advertisement
Add Comment
Please, Sign In to add comment