Learn Intermediate CSS - Learn Responsive Design Cheatsheet - Codecademy
Learn Intermediate CSS - Learn Responsive Design Cheatsheet - Codecademy
}
inside of elements with class nav-container will have a
.nav-container span {
width: 500px;
according to the set percentage values if the parent
}
element changes in size.
.news-row .news-column {
background-size: cover;
The CSS background-size property is used to specify the
size of the background image. When given the value
cover , like background-size:cover , the image covers the
complete background of the container in which it is being
displayed.
The proportions of the image are maintained, so if the
dimensions exceed the container’s, then some parts of
the image will be left out.
CSS unit rem
The CSS unit rem can be used to set the font size of
HTML elements relative to the font size of the root html {
element. 1 rem represents the size of the base font font-size: 18px;
within the root element - the <html> tag. }
In the example code block, the font size for all the
<span> elements will be twice the size of the font size
span {
declared for the root element.
font-size: 2rem;
}
certain width as well as a specific resolution for a CSS /* CSS ruleset */
ruleset to apply. The and operator when chaining
}
together multiple media features allows us to be more
font-size: 12px;
}
#photo {
width: 100%;
}
}
the minimum screen size through using min-width