Padding according to screen size

Hello. How can I give different margins or paddings depending on the size of the screen? I imagine adding css, but can I do it through the side menu? A greeting

You would use media queries for things you want different for different screen sizes.

you can use the p class

p-2
p-sm-2
p-md-2
p-lg-2
p-xl-2

where 2 in the example above can be from 0 to 5

you can also use px and py

so if you want big padding on a mobile and less on a desktop you could use something like:

class=“p-5 p-sm-3 p-lg-1”

you can also do the same with margin m-2 etc

More info here:

Thank you very much for your responses. I’m going to try them.

1 Like