Last active
October 23, 2021 16:58
-
-
Save topherPedersen/542e0e73b54af0daac319428f9f05435 to your computer and use it in GitHub Desktop.
CSS: Make Div Fill Entire Screen Vertically & Horizontally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function Home() { | |
return( | |
<div | |
style={{ | |
position: 'absolute', | |
height: '100%', | |
width: '100%', | |
top: 0, | |
bottom: 0, | |
margin: 0, | |
padding: 0, | |
backgroundColor: 'purple' | |
}} | |
> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment