We focus on display but dip into the other methods
values we care about:
<style>
main {
display: block;
}
header {
display:block;
color: magenta;
}
</style>
<main>
<header>
<h1>header</h1>
</header>
<article>
<p>article p</p>
</article>
<footer>footer</footer>
</main>
hide element completely so that it takes up no space at all
<style>
main {
display: block;
}
header {
display: none;
}
</style>
<main>
<header>
<h1>header</h1>
</header>
<article>
<p>article p</p>
</article>
<footer>footer</footer>
</main>
<style>
main {
display: flex;
align-items: center;
justify-content: stretch;
}
main>* {
flex-grow: 1;
}
header {
color: magenta;
}
</style>
<main>
<header>
<h1>header</h1>
</header>
<article>
<p>article p</p>
</article>
<footer>footer</footer>
</main>
<style>
main {
display: grid;
height: 100%;
grid-template-rows: 1fr 4fr 1fr;
grid-template-columns: 1fr 2fr;
}
main>* {
min-width: 100%;
border: 2px green solid;
}
header,footer {
grid-column: 1/3;
color: magenta;
}
</style>
<main>
<header>
<h1>header</h1>
</header>
<aside>
aside
</aside>
<article>
<p>article p</p>
</article>
<footer>footer</footer>
</main>
@media screen and (min-width: 500px;) {
normal.selector > here {
normal-rule: normal-value;
}
}
@media screen and (max-width: 499px) {
normal.selector > here {
normal-rule: normal-value;
}
}