How to convert PX to REM in CSS

There is an easy trick to convert pixels(px) to REM in css.

1. Put font-size as 10px to html tag

2. Now you can just divide each pixel unit by 10, if padding is 20px then it will convert as 2rem

About the author

Yunus Shaikh

Yunus is Laravel / Angular developer. Specialized in Building REST APIs . Yunus care deeply about delivering Quality work. He also Have hands on Experience on WordPress, HTML, CSS, JavaScript technologies. Yunus love to explore emerging tech stuffs.

View all posts

Leave a Reply

Your email address will not be published.