• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Two lines of CSS in Stylesheet pertaining to font size per header tag.

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Two lines of CSS in Stylesheet pertaining to font size per header tag.

This topic is: resolved

Tagged: Header Tags; CSS; Font Size

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 4 months ago by Genesis Child.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 24, 2014 at 12:48 am #96350
    Genesis Child
    Member

    So I have been changing some of the CSS in the stylesheet to change font sizes. What I noticed is that there is two lines of code pertaining to the font size for things like H Tags.

    For example:

    h1 {
    font-size: 36px;
    font-size: 3rem;
    }

    h2 {
    font-size: 30px;
    font-size: 2.4rem;
    }

    h3 {
    font-size: 24px;
    font-size: 2rem;
    }

    h4 {
    font-size: 20px;
    font-size: 1.9rem;
    }

    h5 {
    font-size: 18px;
    font-size: 1.8rem;
    }

    h6 {
    font-size: 16px;
    font-size: 1.7rem;
    }

    As you may be able to tell I have already changed the font-size (rem) for each Htag. Now this gave me the desired result. I had initially changed the px but nothing changed on the front end of the website. Now my assumption here is that there are two values so that if a browser can't read one font size code it will use the other... right?
    Correct me if I am wrong.
    N E way. I ended up changing the rem size instead and it worked fine.
    My question. I have since gone through and used a rem to px calculator to figure out what I should set the other codes to, (assuming what I have said in the above paragraph is correct). All of the px codes are still the original values (I saved a copy of the stylesheet before I edited anything) and when I entered the px values into the calculator the rem code that it gives me (I have tried numerous calculators) do not match the original rem value that was set. In short the px and rem font size codes don't seem to equate to the same value.

    Am I missing something here. Have I got this all wrong. Are the two values not used in the way I think they are?

    HELP!

    March 24, 2014 at 1:00 am #96352
    Genesis Child
    Member

    Ok ok. I think I just figured this one out on my own to... but a confirmation will see my query set to resolved.

    I assumed that rem and px was standardised as values. That sentence probably makes no sense. I'll try again. It appears as though the rem is set by the user in relation to the px. So one theme might relate rem as a percentage of px completely different to another. So it appears as though the rem is 10% of the value of the px in the genesis sample child theme.

    Is this right?

    So 30px is 3rem and 24px 2.4rem...

    Is my understanding correct?

    As I am now planning on just multiplying the rem by 10 to get the equivalent px value... so I can match them...

    but my initial question still remains... are these two values just there in order to cater towards how different browsers read the code i.e. there is two just in case the browser can't read one or the other.?

    March 24, 2014 at 4:03 am #96365
    Davinder Singh Kainth
    Member

    rem is just another format to set values for various classes. If you only have px values, your theme will still work - however, having rem along with px is new better way. Yes, you can convert px value into corresponding rem values like:

    30px = 3rem
    14px = 1.4rem


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    March 24, 2014 at 3:14 pm #96473
    Genesis Child
    Member

    Initially I just changed the px value and nothing happened front end (no visible change to font size), so I went in a changed the rem value and the font sizes changed.

    Anyway thank you.

    I have just gone through and made sure all the px's match the relative rem, just to be clean.

    Again thanks,

    Genesis Child

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble