CHECKING STATUS
I AM LISTENING TO
|

Absolute vs Relative sizes in design

20. June 2015
.SHARE

Table of Contents

relative sizes, so that fonts and elements resize accordingly.

CURRENT RELATIVE UNITS

  • EM
    Relative to the font-size of the element. The information comes from the browser preset.
  • REM (not supported in older browsers, like IE 8)
    Relative to font-size of the root element
  • PERCENT
    Relative to the container

CALCULATION

If not set differently, 1 em equals 16 Pixel in most browsers, which gives us a calculation basis.

Preset value = 16PX = 100% or 1EM or 1 REM

So 1/16 = 0,0625 is our calculation factor.

PX            EM
  1          = 0,0625
 12 * 0,0625 = 0,75  
 48 * 0,0625 = 3 
250 * 0,0625 = 15,625

EM vs REM

The difference between EM and REM is the inheritance.

The REM value is calculated in reference to the root element, the font size of the HTML, not the BODY,  element.

The EM value is calculated in reference to its parent element.

SUPPORT

Due to limited support in older browsers, you can use graceful degradation in your stylesheet to use both.

li a {
font-size:20px;
font-size:1.25rem;
}

The Pixel value must be added before the REM value !

Enjoy coding …

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

This is my own task / project / workflow solution fully integrated into WordPress, which I began developing in 2025. After the recent cloud outages—and following a significant investment in the Asana ecosystem—I decided to build a robust, self-hosted WordPress solution featuring an almost complete Asana Sync API integration. I don’t have plans to make […]

Inspired byGutenberg Blocks in Gravity Forms: Seamless Widget IntegrationGutenberg Blocks in Elementor: Seamless Widget IntegrationMeet the Isolated Block Editor – Gutenberg, Untethered – Integrated into Elementor The idea took over Once you start working on an idea its hard not to see all the other possibilities ;) The plugin automatically detects and replaces TinyMCE textareas […]

The Gravity Forms HTML field allows you to place a block of free form HTML anywhere in your form. Its limited in its functionality, as you need to know HTML. That is why I started working on a native Gutenberg integration. Gutenberg Field compared to HTML Field Speed & Productivity Media Management Features Unique to Gutenberg Field […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.