Advertisement
Guest User

Untitled

a guest
Jun 27th, 2025
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.44 KB | None | 0 0
  1. body {
  2.     /* increases the pink border to cover the entire screen why? */
  3.     margin: 0;
  4.     /* temporary css that clarifies how the body tag works  */
  5.     /* Only affects the bottom part of the screen and not the header because the header overrides it?
  6.     Is this correct ? */
  7.     background: yellow;
  8. }
  9.  
  10.  
  11. h1 {
  12.   font-family: "Lora", serif;
  13.   font-weight: 400;
  14.   color: #143774;
  15.   font-size: 2rem;
  16.   /* Why is this needed + how does it work?  
  17.   it seems to decrease the space between the h1 tag + subtitle class */
  18.   margin: 0;
  19.  
  20. }
  21.  
  22.  
  23.  
  24. .subtitle {
  25. font-weight: 700;
  26. color: #1792d2;
  27. font-size: .75 rem;
  28. }
  29.  
  30.  
  31.  
  32. header {
  33.     background: pink;
  34.     /* review centering things with css */
  35.     /* centers the text  */
  36.     text-align: center;
  37.     /* increase the padding in the up+down direction why? */
  38.     padding: 2em 0;    
  39.    
  40.  
  41. }        
  42.  
  43.  
  44. nav ul {
  45.     /* temporary css that clarifies how the nav ul element works  */
  46.     border: 1px solid magenta;
  47.     /* removes the dots in the list for the navbar */
  48.     list-style: none;
  49.     /* uses flexbox for the element and puts it on the same horizintal line */
  50.     display: flex;
  51.     /* centers the navbar using flexbox  */
  52.     justify-content: center;
  53.  
  54.     /* Makes it so the navbar doesn't have space on the left and right side */
  55.     padding: 0;
  56.     /*
  57.     Don't use "justify-content: space-between;" or witdh...
  58.     because there could be multiple navbar links and it won't work.
  59.     The solution is to use margin in the  navbar links
  60.     */
  61. }
  62.  
  63. .searchform{
  64.     /* uses flexbox and puts the word search + the search form and the search button on one horizintal line */
  65.     display: flex;
  66.  
  67. }
  68.  
  69.  
  70.  
  71.  
  72. nav li {
  73.     /* temporary css that clarifies how the  element works   */
  74.     border: 2px dotted orange;
  75.     /* add margin to the left and right side */
  76.     margin: 0 1em;
  77. }
  78.  
  79.  
  80. nav a  {
  81.     /* removes the underline from links */ 
  82.     text-decoration: none;
  83.     color: #707070;
  84.     font-weight: 700;
  85. }
  86.  
  87.  
  88. nav a, .searchform {
  89.     /* temporary css that clarifies how the elements works  */
  90.     border: 3px solid green;
  91.     /* Makes  text bigger to better align with the navbar*/
  92.     font-size: 1.35rem;
  93. }
  94.  
  95.  
  96. /*
  97.     hovering works with Mice.
  98.     focusing works with Keyboard. users (or users with screen readers) get the same visual feedback when.
  99.     So when I hover or focus the link changes color
  100. */
  101. nav a:hover,
  102. nav a:focus {
  103.   color: #1792d2;
  104. }
  105.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement