+ 1
What unit of measurement should I use?
px or em?
3 Réponses
+ 2
both are good but px is best for better understanding for beginners all the best
+ 1
Depends on what you are trying to do.
As Ambuj said, px will be fine in most cases. px is an absolute size. So no matter what the font size or style is, it will use the number of pixels you define.
em is used as a relative size value. So if your end user is able to adjust the font size, the amount of screen space taken up by the text will adjust with it.
Here is a good link that will shed some more light:
http://stackoverflow.com/questions/609517/why-em-instead-of-px
0
For a responsive website you will have to use all the measures in %. This way, you can open a website on a smartphone and see less problems than when using pixels size. Do not focus this now! Practicw your knowledge now and then go deep :)