Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS font size problem

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #36811
    shamai
    Member

    im havgin problems… i set an anchor tag to have a font size of 3em…it comes out huge!!
    but the heading on the page is 3em -using the same selector and is not that large??

    why are they not the same size?

    #97323
    dfogge
    Participant

    without a link i cant know for sure what’s happening but this article by Jonathan Snook might be of some help to you: http://snook.ca/archives/html_and_css/font-size-with-rem

    #97324
    shamai
    Member

    the website isn’t up yet…
    if i use px it sets it right. if I use 3em i get a different size for the h1 and the anchor

    #97328
    dfogge
    Participant

    em size is based on the context. you can read more about it here: http://www.webdesignstuff.co.uk/dj107/2011/11/07/one-week-in-web-design-4/

    #97346
    shamai
    Member

    thanks for the links…
    yeah so i fixed it I’m using rem and px

    #97373
    shamai
    Member

    in safari though if i zoom in or out elements get displaced and it looks off.
    if you zoom in twice (cmd plus twice on mac) it looks fine.
    1 zoom things get moved around.
    and I’m using rem for the font… for the width and height of divs I’m using px…

    if i zoom out a button pops down to the next line even though it should stay near the floated left element…

    #97382
    Zeriz
    Member

    As far as I know; you have to define a line-height and a body text size for em to work optimally.



    test


    Try this. :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.