• Resolved WOWTALKS

    (@wowtalks)


    Hi there,

    I want to highlight sections of my text by having them a bigger font size. Can’t use headings as it starts different size text on a new line and not sure what the best way to go about it is.

    Please help!

    Thanks,

    James

Viewing 1 replies (of 1 total)
  • First thing you want to do is decide on what size you want your text. Let’s say 18px. So you want to create a CSS rule that you can apply to your text. Go to Appearance → Theme Options and click the Other tab. For Custom CSS, copy & paste in this rule:

    .highlight-text {
       font-size: 18px;
    }

    What’s good about using a CSS rule is that if you don’t like the size, you can change the appearance with just one edit instead of changing individual elements.

    So, all you need to do is add elements with that class name to set the font size bigger. If you want to highlight a whole paragraph, you could do this:

    <p class="highlight-text">Four score and seven years ago, our fathers
    brought forth upon this continent a new nation, conceived in Liberty,
    and dedicated to the proposition that all men are created equal.</p>

    If you want to highlight just certain words or phrases in a paragraph, use the span element:

    Four score and seven years ago, our fathers brought forth upon this
    continent a new nation, <span class="highlight-text">conceived in
    liberty</span>, and dedicated to the proposition that all men are created
    equal.

    The span tag is an inline element by default, so it won’t break to a new line. Be sure to use the Text editor instead of the Visual editor.

Viewing 1 replies (of 1 total)
  • The topic ‘Have some sections of font a bigger size’ is closed to new replies.