One tip I give you is to try to plan your website/ system to the maximum before creating it, because this way you will be able to better determine the paddings, margins, floats, flexboxs, etc, causing when adjusting in the medias querys, not so much "re-work".
Use for example the following medias querys:
// Dispositivos extra small (telefones em modo retrato, com menos de 576px)
// Sem media query para `xs`, já que este é o padrão, no Bootstrap.
// Dispositivos small (telefones em modo paisagem, com 576px ou mais)
@media (min-width: 576px) { ... }
// Dispositivos médios (tablets com 768px ou mais)
@media (min-width: 768px) { ... }
// Dispositivos large (desktops com 992px ou mais)
@media (min-width: 992px) { ... }
// Dispositivos extra large (desktops grandes com 1200px ou mais)
@media (min-width: 1200px) { ... }
Always think about the minimum width of each of them, before reaching the "breakpoint", because this way, you do not make several adjustments within a media query for after you resize a little more, find that you need another adjustment, an example: @media (min-width: 1200px) { ... }
, you use 1200px as the basis for your responsiveness and not 1920px for example, so by adjusting to 1200px which is the breakpoint, you will know that all other resolutions above that will be working.
Bonus Tip: I don’t know if you use some kind of CSS framework like Bootstrap for example, but I highly recommend the use, even more because of the question of Grids and other classes that already help in the responsiveness in the own writing of HTML code, without you having to work so hard with multiple lines of code later via pure CSS.
I hope I helped, strong hug and success!
without a practical example it’s hard to help, make an example to understand, because I don’t have this problem... I’ve tried to use some framework that already treats this, like
bootstrarp
ormaterial
?– Ricardo Pontual
You’re putting your @media rules as the first things in your CSS, or you’re putting them in the last lines of CSS?
– hugocsl
Hugo, I’m using at the end of CSS.
– Tony Ivan