N
N
Nikita2021-04-20 19:46:07
css
Nikita, 2021-04-20 19:46:07

How should adaptive layout work with such commands as position:absolut, relative and the like. Without using JS?

How should adaptive layout work with such commands as position:absolut, relative and the like?
What should be used in media queries to properly adapt a site that has position: absolute, relative and the like in the code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Elena Fire, 2021-04-20
@BormotunJedy

It is worth checking on different screen sizes so that the coordinates of absolute blocks do not take these blocks off the screen, that is, look at all the values ​​of top, left, right, bottom - and track the behavior of absolute blocks. Respectively correct the top, left, right, bottom of the blocks, if the layout starts to creep somewhere.
As an example: on a 1920px screen, the values ​​of the absolute top block are: 0; left: 540px; - this is normal. But when the screen becomes 700px - the absolute block is not visible, so the values ​​​​should be changed to adequate ones, for example left: 50px;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question