You can also use @media queries to establish your max/min padding/margin (but only according to screen size):
Let's say you want a max padding of 8px, you can do the following
div {
padding: 1vh 0;
}
@media (max-height: 800px) {
div {
padding: 8px 0;
}
}