Il Domandatore Posted September 12, 2020 Share Posted September 12, 2020 On w3schools.com it's suggested use em instead of px because first it's relative and second it's static. I'm still confused; which is the improvement? Link to comment Share on other sites More sharing options...
dsonesuk Posted September 12, 2020 Share Posted September 12, 2020 It styles to current body set font size, so if you increase/decrease body font size it should style proportionately, while px remains static on font size change. Link to comment Share on other sites More sharing options...
Il Domandatore Posted September 13, 2020 Author Share Posted September 13, 2020 Do you mean when we use zoom from our browser to resize page? Link to comment Share on other sites More sharing options...
dsonesuk Posted September 13, 2020 Share Posted September 13, 2020 No when you increase font size; its relative to size of font. Link to comment Share on other sites More sharing options...
Sherin Posted September 22, 2020 Share Posted September 22, 2020 The key value em units offer is they allow sizing values to be determined by a font size other than that of the html element. For this reason, the primary purpose of em units should be to allow for scalability within the context of a specific design element Link to comment Share on other sites More sharing options...
Ingolme Posted September 22, 2020 Share Posted September 22, 2020 19 hours ago, Sherin said: The key value em units offer is they allow sizing values to be determined by a font size other than that of the html element. For this reason, the primary purpose of em units should be to allow for scalability within the context of a specific design element Source: https://webdesign.tutsplus.com/tutorials/comprehensive-guide-when-to-use-em-vs-rem--cms-23984 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now