V
V
Vasily Mazhekin2018-11-20 14:05:28
css
Vasily Mazhekin, 2018-11-20 14:05:28

How to display a line on fixed length mobile screens?

Now there are many new different devices. The question is quite simple.
How to display a vertical line with a length of, for example, 10 centimeters? To have 10 cm on all mobile devices? width: 10cm
How can this be tested if there are no real devices?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Mazhekin, 2018-11-22
@mazhekin

Understood, I not absolutely correctly asked a question.
It is better to do everything through media to adapt to different screens.

// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) and (max-width: 767.98px) { ... }

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) and (max-width: 991.98px) { ... }

// Large devices (desktops, 992px and up)
@media (min-width: 992px) and (max-width: 1199.98px) { ... }

// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question