TheWalkingPlay2500 TheWalkingPlay2500 - 8 months ago 76
CSS Question

Bootstrap responsive height

I'm making a website and I'm making a register form, but I need to adjust div height's according to wiewport, something like this:

xs devices: 12

sm devices: 9

md devices: 7

Note: I'm using bootstrap 4

Answer Source

Something like this :

@media only screen and (max-width: 500px) {
       height: 12px;

You can use this website to find the viewport sizes for multiple devices and you replace the max-width by the size you want.

The media querry will check for your screen size and applies the directives inside the block if the condition is true.

More about media queries here and here