+ 1

Why is it scrolling down? I thought it should fit the entire screen.

*{ margin: 0px; height: 100%; } div { border: 5px solid green; width: 100% - 10px; height: 100%; /* height: 100% - 10px; doesn't work either */ }

1st Oct 2017, 4:12 PM
RBon
2 Answers
+ 1
*{ margin: 0px; height: 100%; } div { border: 5px solid green; width: 100% - 10px; height: 98%; /* height: 100% - 10px; doesn't work either */ }
1st Oct 2017, 5:05 PM
Rishita
Rishita - avatar
+ 1
@Rishita, why should I set height to 98%? I mean, where does it come from?...
1st Oct 2017, 5:12 PM
RBon