enter image description here
this is my css for reference
<code>@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@media (prefers-reduced-motion: no-preference) {
* {
scroll-behavior: smooth;
}
}
body {
font-family: 'Poppins', sans-serif;
margin: 0;
}
* {
font-family: 'Poppins', monospace;
margin: 0;
box-sizing: border-box;
}
</code>
<code>@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@media (prefers-reduced-motion: no-preference) {
* {
scroll-behavior: smooth;
}
}
body {
font-family: 'Poppins', sans-serif;
margin: 0;
}
* {
font-family: 'Poppins', monospace;
margin: 0;
box-sizing: border-box;
}
</code>
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@media (prefers-reduced-motion: no-preference) {
* {
scroll-behavior: smooth;
}
}
body {
font-family: 'Poppins', sans-serif;
margin: 0;
}
* {
font-family: 'Poppins', monospace;
margin: 0;
box-sizing: border-box;
}
Im trying to add a gradient background, but it does not seem to occupy the entire screen, can someone please help?
New contributor
snsnzjkt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
Try
<code>body {
....
min-width: 100vw;
min-height: 100vh;
}
</code>
<code>body {
....
min-width: 100vw;
min-height: 100vh;
}
</code>
body {
....
min-width: 100vw;
min-height: 100vh;
}
This makes the body atleast the size of your viewport. This may create undesired effects on smaller viewports.