Viewing 5 replies - 1 through 5 (of 5 total)
  • You shouldn’t really change font size by using a header. Technically speaking headers (h1, h2 h3 etc) are headers and the reason they are numbered is because they are sub level headers. So a h3 is a sub heading of a h2 and so on. The elements describe relationship rather than size.

    Now, having said that, I don’t suppose doing it once or twice will bring the internets grinding to a halt.

    Can you be a bit more explicit about the actual text you want to change and whether that is something that you are doing consistently across the site?

    One way to do it would be to open a page in the text editor and add code like this:

    <p class=”biggerText”>Write some fancy blog content</p>

    Then you could use that class for every instance you want to have differently formatted text and use CSS like this:

    .biggerText {
    Color: red;
    font-size: 1.2em /*you can use other units of length*/
    }

    The new CSS should really go in a child theme.

    Thread Starter wp user

    (@anti-hack-software)

    No, actually I want to change as a overall setting the size of ALL main font.

    Let’s say right now by default it’s 10px, and instead I want it 14.

    I am sure it should be doable through editor. The question is, where is it?

    You have access to you style.css file in the editor right?

    This rule (line 255 I think) is setting the size of the body font. All other font sizes will be relative to it.

    body {
    font-size: 16px;
    line-height: 1.4;
    }

    Remember, if you are not using a child theme and ever upgrade the theme itself you will lose those changes.

    If you are using a child theme, just drop a rule using body as a selector that adds a new font-size.

    body {
    font-size: 18px;
    }

    Changing font size may have an impact on other elements of the site so have a good look round if you do change it this way.

    Thread Starter wp user

    (@anti-hack-software)

    Great, thank you! It worked.
    Could you please be so kind to look at my other questions i posted today? Didn’t get it solved yet.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’ll just have to wait for people to respond, please be patient.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to change main font size’ is closed to new replies.