Describe what a pseudo-class does
Use float and clear properties in CSS
Use flexbox to easily distribute elements on the page
A CSS pseudo-class is a keyword added to selectors that specifies a special state of the element to be selected.
What does a pseudo-class look like?
p:hover {
color: red;
}Link-based pseudo-classes
Text-based pseudo-classes
pseudo-elements
Interaction-based pseudo-classes
Family-based pseudo-classes
CSS property specifies that an element should be taken from the normal flow and placed along the left or right side of its container, where text and inline elements will wrap around it.
div {
float: left;
}div {
float: right;
}The simplest way to ensure a nearby element is aligned left.
footer {
clear: both;
}Revisit the boxes codepen and try out float and clear!
Flexbox Layout is a way to position HTML elements. It was developed and design to solve most if not all of the layout issues commonly encountered by web developers.
Why do we use pseudo-classes?
Discuss with your table
How do you break out of a float?
Why do we use Flexbox?