Answers for "what if i want a section to take the height of a viewport html"

CSS
0

what if i want a section to take the height of a viewport html

/* in css file */

html,
body {
  height: 100%;
  margin: 0;
}
section {
  height: 100vh;
}
section:nth-child(1) {
  background: lightblue;
}
section:nth-child(2) {
  background: lightgreen;
}
section:nth-child(3) {
  background: purple;
}
section:nth-child(4) {
  background: red;
}
section:nth-child(5) {
  background: yellow;
}
Posted by: Guest on March-17-2021
-1

what if i want a section to take the height of a viewport html

<!--in html file-->
<section></section>
<section></section>
<section></section>
<section></section>
<section></section>
Posted by: Guest on March-17-2021

Code answers related to "what if i want a section to take the height of a viewport html"

Browse Popular Code Answers by Language