There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
Really good that you find this css rule.
But the title of the chapter is “DOCUMENTATION AND RESEARCH”.
Google it!
:after is pseudo-element. We can add content to our page with CSS.
‘+’ I think we can use documentation, google, stackOverflow AND we can TRY to experiment by yourself.
What is the purpose of that rule? Maybe it has to do with width of the nav element… If we delete this rule our nav will have 0px hight despite the content of nav tag. Why? Because two children elements h1 and ul has float property.
" The float CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow".
nav "sees"these elements, but they “removed from the normal flow of the page”. That’s why nav’s hight = 0. And that’s why we use padding and pseudo-element :after whit empty content on our nav’s .clearfix class.
In this lesson we have only part of the portfolio site project: header with logo and navigation.
Maybe you will have another nav in footer without floating elements in it. Therefore you use classes.