0
What is the best way to make sections of a site fit the window height?
2 Answers
+ 6
body {
margin: 0; // To remove 5 px gap(used on old pc)
height: 100vh;
}
% - relative to parent element
vh - percents, relative to screen(window) size
vh - for absolute height
vw - for absolute width
all is absolute, relative to wondow size
+ 4
body {height: 100vh; margin: 0}