Asked • 04/06/19

Should I use px or rem value units in my CSS?

I am designing a new website and I want it to be compatible with as much browsers and browser settings as possible. I am trying to decide what unit of measurement I should use for the sizes of my fonts and elements, but am unable to find a conclusive answer.**My question is: should I use `px` or `rem` in my CSS?*** So far I know that using `px` isn't compatible with users who adjust their base font size in their browser.* I've disregarded `em`s because they are more of a hassle to maintain, compared to `rem`s, as they cascade.* Some say that `rem`s are resolution independent and therefore more desirable. But others say that most modern browsers zoom all elements equally anyway, so using `px` is not a problem.I'm asking this because there are a lot of different opinions as to what is the most desirable measure of distance in CSS, and I am not sure which is best.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.