N
N
Neyury2015-11-28 00:07:32
css
Neyury, 2015-11-28 00:07:32

Is it possible to use rem like this? How do you make responsive websites?

I've been practicing layout for some time now, while I'm making pages and sites just for myself.
For adaptability (Rubber + media query) I decided to choose rem, as I considered it a convenient solution. So that the calculation of sizes does not cause difficulties, he prescribed the following:

html {
  font-size: 62.5%; /* 10px */
}

For elements where precision is important, such as borders, I continue to use px. The units for indentation depend on the requirement. If they must be fixed, then px, otherwise rem. Is this a normal practice, is it possible to do this? How are you doing?
What units do you use for adaptability, how and where do you use them? Tell me please, real experience is interesting. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-12-03
@darkmerge

I use percentages for blocks. For fonts, I'm not too lazy to register once for tablets a smaller size through media

M
Maxim Gatilin, 2015-12-03
@gatilin222

For the main unit I use rem, but depending on the situation I use%, vh, vw, em, px. Why rem? Try to scale the page (ctrl + "+") which are laid out by rem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question