CSS font-size both in px and rem

Community Forums Forums Design Tips and Tricks CSS font-size both in px and rem

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  dogstalkpoetry 7 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #93338

    dogstalkpoetry
    Member
    Post count: 34

    Hi there, I’m looking at the CSS stylesheet of the Genesis sample theme and noticed that font-sizes for h1, h2, h3, h4, h5, h6 are all stated in both px and rem. Eg.

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

    I don’t understand why this is so? Why not just use either unit of measurement instead of both?
    Hoping somebody will explain this to me, thanks.

    #93340

    braddalton
    Participant
    Post count: 10232

    Its used as a fallback for some browsers.


    #93448

    dogstalkpoetry
    Member
    Post count: 34

    You’re right. I found this article that explains further: http://snook.ca/archives/html_and_css/font-size-with-rem
    Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.