Jacob Tomlinson 9/4/2015

Quick Tip - em vs rem

Read Original

This technical article clarifies the distinction between the CSS relative length units 'em' and 'rem'. It explains that 'em' is relative to the font-size of its parent element, which can cause compounding effects in nested structures, while 'rem' is relative to the root (html) element's font-size, providing consistent sizing. The article includes code examples demonstrating the visual outcome of using each unit in nested divs.

Quick Tip - em vs rem

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week