Support » Themes and Templates » Using of different font-weight in headings

  • I want to alternate between normal and bold font-weight in my h1.
    (This is an example)
    Is this possible? How do I do then?
    I work with pages (not posts), and use Page title as h1.

    Cheers,

    Björn

Viewing 5 replies - 1 through 5 (of 5 total)
  • Create a custom page template that uses a different class on the h1 tag. You can then style the new class differently in your stylesheet and apply the new page template as required.

    Thread Starter einar_

    (@einar_)

    I think I have to change something in this code –
    <h1 class=”entry-title”><?php the_title(); ?></h1>
    I can’t change this class to be both bold and normal, and I can’t use two classes to establish this “effect” in same h1-tag.

    Use something like:

    <h1 class="alt"><?php the_title(); ?></h1>

    and then style using something like:

    h1.entry-title,h1.alt{
    [ current styling goes here ]
    }
    h1.entry-title {font-weight:normal;}
    h1.alt {font-weight:bold};
    Thread Starter einar_

    (@einar_)

    I’m not good explaining the problem – I write it in static HTML instead, just for an example:

    <h1>This is normal font-weight, and <span style="font-weight:bold;>this is bold.</span></h1>

    And the h1 will then look like:
    This is normal font-weight, and this is bold.

    Try reading what I suggested above.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using of different font-weight in headings’ is closed to new replies.