A question for the coders. Whether it is necessary to specify the dimensions in pixels, or in em?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
7 views
Now all browsers increase page normally and the size in pixels for them, not a hindrance. As far as I know, previously it was recommended to specify all dimensions are in em so that the page did not scale correctly if you increase.


So what to do now with modern browsers? Stupid to specify everything in pixels? And are there any exceptions?
by | 7 views

7 Answers

0 like 0 dislike
In pixels, the size of the font to indicate it is not necessary for this, there are points (pt). In all modern browsers, as far as I know, correctly scales any way of setting the pin. To use em you should rather for the sake of a hierarchy of sizes: indoor unit 2em will always have a font size twice the font in an external unit, as if we did not change anything. Plus, you can take into account non-standard font in the user's system.
\r
Pixels are used in the setting of margins and size of elements, but not always. If you want the indent dependent on the font size, it should be set in em. This indentation, for example, is used in the padding of a block quote.
by
0 like 0 dislike
In itself, the dimension size in pixels (with regards to layout) was not only to die, but wasn't supposed to be born. There is a normal DPI-independent units, and they need to use...
by
0 like 0 dislike
Personally, I don't understand how you can impose the NOT pixels.
For blocks\\pictures\\of floaty and modern design solutions in most cases, work on the pixel grid.
Here you have the link icon in the dimensions 16 pixels, and the text is 13 pixels. All beautifully aligned.
And here comes the man with the large fonts on verstka on em\\pt and complains that he, you know, layout goes.
How to be?
\rThe dad uses uvelichiny font in Windows. Especially for him I translated a couple of websites on the pixels. What would the site look as it should. And not as someone has
by
0 like 0 dislike
Why force the user to use zoom and ignore font settings? Not to mention the fact that the site, including sizes of elements in pixels, it looks, to put it mildly, on different screens FullHD and 800x480
by
0 like 0 dislike
All isnil typeset in pixels and all okay. The record is 14 pixels, the font is much clearer for understanding its size than some sort of 1.45 em. Personally, when tested, did not understand why everyone is so stand up for the em scales the same way. The majority of those who spoke above a maximum em argue their phrases "just Because", "Because it's right".
by
0 like 0 dislike
Love the points easier to count than em, and in fact more correct.
by
0 like 0 dislike
Early typeset paragraphs and EM and periodically received calls from disgruntled clients complaining of a "giant fonts" from employees/visitors/customers (incorrectly set the font size in IE). It is clear that in this situation the only right decision — to score a hard-coded pixel sizes, the benefit of using EM is reduced to a single line — job font-size for body.
by

Related questions

110,608 questions
257,186 answers
0 comments
28,140 users