Title: Font Size
Last modified: August 20, 2016

---

# Font Size

 *  [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/)
 * Hi there. I’m using the Sonar theme and have made a child theme. I want to make
   the font size bigger across the whole site. I read somewhere that it’s better
   to have a relative size than an absolute one. Can someone help me with a little
   code? Where and how do I set the base font size? And then do I only use percentage
   for font-size throughout the rest of my CSS file?
 * Thanks in advance!
 * [http://www.radioart.org/studioroot](http://www.radioart.org/studioroot)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755850)
 * Base font sizes should be set on the body or html element. Any other font size
   rule should use % or (even better) ems.
 *  Thread Starter [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755854)
 * So I should add it here?
 *     ```
       /* =Global Elements
       -------------------------------------------------------------- */
   
       /* Main global 'theme' and typographic styles */
       body {
       	background-color: #53A4E6;
       	background-image: url('images/default-bg.png');
       	background-repeat: repeat;
       	background-position: top center;
       	background-attachment: fixed;
       }
       ```
   
 * should I add this?
 * `font-size: 16px`
 * and then what kind of numbers do I use in front of em? Is 2em, 2 x 16px?
 * `font-size: 2em`
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755856)
 * > So I should add it here?
 * Yes – unless you are using a child theme.
 * > should I add this?
 * No. The base font size ideally should be set to 100%. See [http://www.w3schools.com/css/css_font.asp](http://www.w3schools.com/css/css_font.asp)
 *  Thread Starter [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755867)
 * okay, thanks. I’m going to try adding this to my child theme
 *     ```
       body {
       	font-size: 100%
       }
       ```
   
 * and then go through the rest of the CSS, find all the font-sizes and change them
   from px to ems using my child theme. Any of that sound horribly wrong?
 *  Thread Starter [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755871)
 * I added the above code to my child theme and it only changed the font size in
   my sidebar menu. Nothing seemed to change in the text of my pages.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755873)
 * That sounds perfect! As a general rule of thumb, when converting pixels to em,
   use a ratio of 1em = 11px. That should keep the font sizes pretty much the same
   on a browser with a default font of (say) 16px.
 *  Thread Starter [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755876)
 * that’s very helpful thank you esmi!
 * now I haven’t tried changing anything throughout the rest of my CSS so i’ll go
   give that a shot.
 *  Thread Starter [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755879)
 * now that I’m going through my CSS I’m realizing that most everything is measured
   in px including padding, margins, line height. If I change my font-sizes to be
   measured in ems then should I changed everything else too?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755882)
 * I don’t think there is anything to be gained by changing padding & margins to
   a relative size unit except under special circumstances. Line height is an exception.
   It will work a lot better if you use the same unit of size for line-height as
   you use for font-size. Personally, I think a line-height of 1.3em to 1.5em works
   best for large blocks of text (eg your main content area).
 *  Thread Starter [nellie.g](https://wordpress.org/support/users/nellieg/)
 * (@nellieg)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755883)
 * Great thank you thank you. One more and then I’ll stop pestering you.
 * As a general rule of thumb, if there is not a font-size or line-height assigned
   will it default to the size I’ve specified in the body element?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755884)
 * Yes unless it has a parent element – in which case it will inherit the parent’s
   size.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Font Size’ is closed to new replies.

## Tags

 * [absolute](https://wordpress.org/support/topic-tag/absolute/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [font](https://wordpress.org/support/topic-tag/font/)
 * [percentage](https://wordpress.org/support/topic-tag/percentage/)
 * [size](https://wordpress.org/support/topic-tag/size/)
 * [style](https://wordpress.org/support/topic-tag/style/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/font-size-17/#post-2755884)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
