I
I
Ivan Ivanovich2019-03-22 18:42:19
css
Ivan Ivanovich, 2019-03-22 18:42:19

Question on optimization for different screens?

Hello. Stupid question, but still I'd better be sure of the correct answer.
If my image has margin-left: 2%;
And when adapting to different screens, I want to remove this property.
How can I do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanKud, 2019-03-22
@IwanQ

@media screen and (max-width: ширина_экрана) { /* максимальная ширина экрана в пикселях меньше которой свойство будет изменено */
    элемент {
        margin-left: 0;
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question