-2

This might be a silly question but I just couldn't get the answer to this.

I have downloaded a new WP theme, and in the CSS, there are two different font-size properties for single elements like heading, description and so on.

One of them is in px and the other one is in rem.

I don't understand this. Is it to make it suitable for different browsers? I think we use extensions for that.

Moreover, the changing the px doesn't change the font size. Anyone, please help.

Ron
  • 1
  • 3
  • Can you post an example? Or a link to a page that shows this? – Ken H. Feb 27 '17 at 03:55
  • I don't understand why I got two downgrades for this. Here's the link: https://www.dropbox.com/s/n9x76c85ccz34u4/4.PNG?dl=0 – Ron Feb 27 '17 at 04:03

1 Answers1

0

This will help you to understand. Both em and rem are flexible, scalable units which are translated by the browser into pixel values, depending on the font size settings in your design. If you use a value of 1em or 1rem , it could translate in the browser as anything from 16px to 160px or any other value.

https://webdesign.tutsplus.com/tutorials/comprehensive-guide-when-to-use-em-vs-rem--cms-23984

Lasantha
  • 258
  • 1
  • 11
  • Thanks, but I asked why the font-size attribute has been used TWICE in the same element tag in the CSS. Why can't I not change the size by either changing the rem unit or the px one? – Ron Feb 27 '17 at 05:03
  • can you check this - http://stackoverflow.com/questions/11799236/should-i-use-px-or-rem-value-units-in-my-css – Lasantha Feb 27 '17 at 05:23