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
padding: 2rem; /* padding:20px*/