Graphics
Photoshop Help
The Graphics Champ
For beginner to advanced graphic designers, marketers, and web developersLearn Elements Now
Master Adobe Photoshop Elements to quickly and easily edit your digital photosDigital Background
Create digital backgrounds in Photoshop
Ecover Help
Ecoverz-go
Offers 50 Photoshop Ecover Action Scripts.Graphics Champ
Create Stunning ECovers For EBooks, EZines, EBoxes, Cd & DvdEcover Creator
Push Button eCover Software Version 2.0
Setting Font Size
The font-size property sets the size of the text.
Set Base Font Size on the <body> With em
- The em size unit is recommended by the W3C
- Using em size unit makes it possible to adjust the text size in all browsers
- Note: When using pixel size unit, the text can be resized in all browsers using the zoom tool (however, this resizes the entire page, not just the text).
Convert your pixel size unit definition to em
- 1em is equal to the current font size. The default text size in browsers is 16px. So, the default size of 1em is 16px.
- The size can be calculated from pixels to em using this formula: pixels / 16 = em.
- 12px / 16 = 0.75em
Set <p>'s font-size to 100% (of the <body>'s defined em font-size)
body {font-size:.75em;}
h1 {font-size:150%;}
h2 {font-size:125%;}
p {font-size:100%;}
- Using % and em are equally good, but % tend to be more easily and consistently interpreted by developers and older browsers.
- Using % allows developers to adjust the base font defined on the <body> and all other selectors will adjust based on the defined font-size percentage.
- Website content should always be contained within HTML selectors. This will help devices reading your HTML understand your content. However, if for some reason, some content is not contained within a HTML selector, by defining the base font-size on the <body> and making the <p> font-size defined at 100%, the text not contained within a selector will take the font-size defined on the <body>, which matches the <p>, matching the font-size.











