Guest User

Untitled

a guest
Jul 25th, 2025
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.75 KB | None | 0 0
  1. body {
  2.     /* temporary css that clarifies how the body tag works  */
  3.     /* Only affects the bottom part of the screen and not the header because the header overrides it? */
  4.     /* Is this correct ?  */  
  5.  background: yellow;
  6. }  
  7.  
  8.  
  9. /* ****************************************************************
  10. Layout
  11. **************************************************************** */
  12.  
  13.  
  14.  
  15. header {
  16.     /* temporary css that clarifies how the header element works    */
  17.     background: pink;
  18.     border: 8px dotted green;
  19.     /* review centering things with css */
  20.     /* centers the text  */
  21.     text-align: center;
  22.     /* increase the padding in the up+down direction why? */
  23.     padding: 2em 0;    
  24.     text-align: center;
  25.  
  26.     display: flex;    
  27.     /* spaces the titles and the navbar  */
  28.     justify-content: space-evenly;
  29.     /*Create Space between the titles and the navbar when they get to close */
  30.     /* why does margin make the box smaller? */
  31.     padding: 0 1em;
  32. }  
  33.  
  34. /* If [device width] is less than or equal to 675px */
  35. @media (max-width: 675px) {
  36.     header {
  37.         flex-direction: column;
  38.     }
  39. }
  40.  
  41.  
  42. .container {
  43.   width: 90%;
  44.   max-width: 900px;
  45. }
  46.  
  47. /* ****************************************************************
  48. Typography
  49. **************************************************************** */
  50.  
  51. .title {
  52.   font-family: "Lora", serif;
  53.   font-weight: 400;
  54.   color: #143774;
  55.   font-size: 2rem;
  56. }
  57.  
  58.  
  59.  
  60. .seccondary-title {
  61. font-weight: 700;
  62. color: #1792d2;
  63. }
  64.  
  65.  
  66. .title, .seccondary-title {
  67.   /* Decreases the space between the h1 and h2 elements. header elements by default have space. */
  68.   line-height: 1;
  69. }
  70.  
  71. /* ****************************************************************
  72. Navigation
  73. ****************************************************************   */
  74.  
  75. nav ul {
  76.     /* temporary css that clarifies how the nav ul element works    */
  77.     border: 5px solid blue;
  78.     /* removes the dots in the list for the navbar */
  79.     list-style: none;
  80.     /* uses flexbox for the element and puts it on the same horizintal line */
  81.     display: flex;
  82.     /* Makes it so the navbar doesn't have space on the left and right side  and aligns it to the left. */
  83.     padding: 0;
  84.     /*
  85.     Don't use "justify-content: space-between;" because the space is to big on big screens between navbars
  86.     "witdh:..." won't work because there could be multiple navbar links and it won't properly space it.
  87.     The solution is to use nav li {margin 0 1em} in the  navbar links.
  88.     */
  89.  
  90.     /* centers the navbar, "text-align: center;" in header doesn't affect it due to the flexbox. */
  91.     justify-content: center;  
  92. }
  93.  
  94.  
  95.  
  96.  
  97.  
  98. nav li {
  99.     /* temporary css that clarifies how the  element works   */
  100.     border: 2px dotted orange;  
  101.     /* add a margin to the left and right side it causes the nav li to be spaced.  */
  102.     /* Why not use padding here ?     */    
  103.     margin: 0 1em;
  104. }
  105.  
  106. nav a  {
  107.     /* removes the underline from links */ 
  108.     text-decoration: none;
  109.     color: #707070;
  110.     font-weight: 700;
  111.     /* temporary css that clarifies how the elements works */
  112.     border: 3px solid green;
  113.     /* Makes  text bigger to better align with the navbar*/
  114.     font-size: 1.35rem;
  115. }
  116.  
  117.  
  118. /*
  119.     hovering works with Mice.
  120.     focusing works with Keyboard. users (or users with screen readers) get the same visual feedback when.
  121.     So when I hover or focus the link changes color
  122. */
  123. nav a:hover,
  124. nav a:focus {
  125.   color: #1792d2;
  126. }
  127.  
  128.  
  129.  
  130. nav form {
  131.     /* uses flexbox and puts the word search + the search form and the search button on one horizintal line */
  132.     display: flex;
  133.     /* temporary css that clarifies how the elements works. Why does "nav li" not create a green border?     */
  134.     border: 3px solid green;
  135. }
  136.  
  137.  
Advertisement
Add Comment
Please, Sign In to add comment