
/* part 2 css  */

/* lets make the section element have a good height */

section{
    height: 100vh;
  }
  
  /* it means we are just doing it as 8px*100  */
  
.blue{
    background-color:rgb(0,0,255)
}
  
.red{
    background-color:red
}

.green{
    background-color:green
}
  
  
header, footer{
    color:blanchedalmond;
    height:100px;
    text-align:center;
}

/* today i realised there are no semi colons in css  */

header{
    position:sticky;
    top:0;
    font-size:5rem;
}

/* he says we want footer at the end of each section and it should stick to the bottom of the viewport 
with fixed .. it will keep staying at the same position if you scroll up or down */

footer{
    background-color:black;
    
    bottom:0;
    text-align:center;
    /* position:fixed;
    width: 100%; */
    /* instead we want it to be sticky to the bottom and the container is actually jusst the body element i guess ... */
    position:sticky;
    height: 90px;
    font-size: 3rem;

}

/* footer is still a block level element and it should have taken up the full width of the page  */
/* speaking of which the footer is an inline element or something ? */
/* the text-align property worked in the footer element .. since anchor elements can hold only text .. these are considered text inside the footer element 
main problem is . width.
*/
a{
    text-decoration:none;
    color:purple;
    background-color:black
}


/* here is the trick about the width of the footer element 


eacher: Exactly. When you use position: fixed;, the element is positioned relative to the viewport, and its width is now determined by its content or any explicit width you set, not by the width of its parent container.

Student: That's tricky. So, if I want it to have the width of the parent, what should I do?

Teacher: Good question! To make it stretch to the width of the parent, you usually need to explicitly set the width of the fixed element to 100% in your CSS. This way, it will fill the entire width of its containing element.*/

/*  if you are confused about the width of the container just change it later .. and its still adheres to the box model properties */

a:visited{
    color:white;
}

.social{
    position:fixed;
    top:30%;
    z-index:1;
    font-size:inherit;
    padding:1rem;
    background-color: pink;
}

/* here the inherit font-size on the button is depended on the font size of the side by side elements  */

h2{
    text-align:center;
}


/* this css example is not responsive for mobile devices you need to find a way to make it responsive later  */

/* an id can become a location of the page in html 
so inside the anchor element's href property .. paste in #one , #blue something like that 


*/

html{
    scroll-behavior:smooth;
}

/* so this is like css is adding some styling functionality itself  */