Hello Smileys,
Unfortunately, Nicepage doesn't directly offer a conversion feature for changing font sizes from px to em. However, you can try still to achieve this conversion manually through the following methods:
Try Using CSS:
Paste the following code, replacing 16px with your actual base font size:
body {
font-size: 16px; /* Adjust this to your actual base font size */
}
.my-class {
font-size: 12px; /* Replace with your current px value */
}
.my-class {
font-size: 0.75em; /* Calculate the em value here */
}
Before making any changes, create a backup of your website
Additional information can also be found at this link:
W3Schools px to em conversion table: https://www.w3schools.com/tags/ref_pxtoemconversion.asp
Dev Devout px to em converter: https://stackoverflow.com/questions/4575469/script-to-convert-css-sheet-from-px-to-em
To my understanding when using em's as the font size, the fonts would scale on the browser size.
This is not real, not true, if you set the my-text: 1em; it means the my-text will be 16px, and my text will be always 1em, it is not growing or shrinking itself, by the browser. If you want to use EM's for font size, you must write CSS, and you must write media query, em is better than px for responsive, if is easier to grow or shrink than PX but after adding CSS, after manipulation, itis not changing itself.
Please let us know if you have any further questions.
...................................................
Sincerely,
George.
Nicepage Support Team
Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp
Last edited 24 February 2024 by Support Team