@Essosolim01Submitted about 1 month ago
Usman Shabir Kousar
@usman-97All comments
- @usman-97Posted about 1 month ago
@Essosolim01 Solution looks good and pretty much matches the design but there is some extra margin at top and bottom which creates extra space. Also we should only set height and width when it is required so in your case try to set min-height instead of fixed height.
You can use flex to center your div vertically and then use margin auto center it horizontally:
.container { display: flex; justify-content: center; # center div vertically margin: 0 auto; # center div horizontally }
For height try to set a min-height so something like this:
body { min-height: 100vh; }
Marked as helpful1