Jump to content

CSS Sizing throughout Stylesheet?


random1

Recommended Posts

Hey All,

 

I'm trying to set up a consistant rule for my stylehseet's sizing.

 

For all measurements I wish to use em instead of px or %.

 

Is this a good idea? Any drawbacks for doing this? Do all browsers accept em as a measurement?

 

E.g. I've set my body selector to:

 

font-size:0.875em;

 

Refferred Source: http://pxtoem.com/

 

SIZINGS:

 

Pixels EMs Percent Points

6px 0.429em 42.9% 5pt

7px 0.5em 50% 5pt

8px 0.571em 57.1% 6pt

9px 0.643em 64.3% 7pt

10px 0.714em 71.4% 8pt

11px 0.786em 78.6% 8pt

12px 0.857em 85.7% 9pt

13px 0.929em 92.9% 10pt

14px 1em 100% 11pt

15px 1.071em 107.1% 11pt

16px 1.143em 114.3% 12pt

17px 1.214em 121.4% 13pt

18px 1.286em 128.6% 14pt

19px 1.357em 135.7% 14pt

20px 1.429em 142.9% 15pt

21px 1.5em 150% 16pt

22px 1.571em 157.1% 17pt

23px 1.643em 164.3% 17pt

24px 1.714em 171.4% 18pt

Link to comment
Share on other sites

Em is a not a "measurement" it is a relative way of making text and divs interact in a proportional way. Now that's not to say you can't use em just for text, but that isn't the true purpose of the em measurement. Ems are used as a relative measurement. Something that can be successfully used to scale divs and text together.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.