FAQ: Documentation and Research - Review

This community-built FAQ covers the “Review” exercise from the lesson “Documentation and Research”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn How to Build Websites

FAQs on the exercise Review

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 (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 (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 (like) to up-vote the contribution!

Need broader help or resources? Head to Language Help and Tips and Resources. If you are wanting feedback or inspiration for a project, check out Projects.

Looking for motivation to keep learning? Join our wider discussions in Community

Learn more about how to use this guide.

Found a bug? Report it online, or post in Bug Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

https://www.codecademy.com/paths/learn-how-to-build-websites/tracks/responsive-design-and-accessibility/modules/css-documentation-and-debugging/lessons/css-documentation-research/exercises/review

How do I create more Vertical space in between the 3 buttons—> Home About Contact
Thank you…

Can someone explain the purpose of the following CSS code:

.clearfix:after {
content: " ";
visibility: hidden;
display: block;
height: 0;
clear: both;
}

It connects with a nav element in the HTML:

My Portfolio

Why has :after been used to style the clearfix class, rather than just styling the nav element directly?

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.

I explore a few CSS functions within the “li” item:

li {
display: inline-block;
border-radius: 5px;
margin-right: 25px;
text-align: center;
background-color: #28587B;
box-shadow: 0.7rem 0.4rem 0.4rem #ff8e7b;
}

li:hover {
margin-right: 15px;
box-shadow: none;
transition: 1.5s;
}

li:not(:hover) {
transition: 1.5s;
}