Reputation: 227
I have been searching for em/px value use for web apps and apparently nowadays both are behave same, since the latest browser supports both in same way. My question is, when designing complex web app, having responsive table, grids and charts: what is the best value to use, not only for font size but also for padding/margin/height?
Upvotes: 0
Views: 987
Reputation:
Ems are becoming increasingly popular in web documents due to scalability and their mobile-device-friendly nature. One problem with the pixel unit is that it does not scale upward for visually-impaired readers or downward to fit mobile devices. That's why i recommend you to use ems in fonts and pixels for blocks
Upvotes: 2
Reputation: 1403
This is an extremely subjective question. In addition, there are more options than just em and px: rem, em, px, vw/vh. Understanding how they all work is the key to picking which one is best for you and you app depending on the situation. Most of the time I use rem/em for responsive reasons, but there are times with vw/vh or px are a better option for me. It totally depends on what you're trying to accomplish.
Upvotes: 2