I was going through the personal portfolio sample project of freecodecamp. I am confused about one line of a CSS property.
.nav-list a {
display: block; /*here*/
font-size: 2.2rem;
padding: 2rem;
}
Element is behaving normally when the display: block;
property is enabled. But when I remove the element. It behaves differently.
This is how it changes after removing the property.
I am unable to get why is this happening. What exactly display: block
does here.