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


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