I am doing some initial tests already in the production state. All the pages of the project load the following at the beginning:
<style>
body {
padding-left: 30px;
padding-right: 30px;
}
</style>
I was testing a mobile device and it looks good on a perfect PC. Now, when I upload data entry forms (registration form for example) I do the following:
<div style="padding-left: 20%; padding-right: 20%">
... dentro de este div, todo el formulario de ingreso de datos
</div>
On the desk, it looks perfect, it gives a sense of interesting prolixity but when I see it on the mobile device, it looks too narrow.
I would like to detect the size of the screen and in those cases use another div in which I have neither padding-left nor padding-right.
QUESTION 1: This how would I have to do it?
QUESTION 2: Could I do it with PHP?