Forums

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

Home Forums CSS adjusting text size as screen gets smaller or larger

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34419
    webfriend
    Member

    Is it possible to have text get smaller or larger as the window or screen gets smaller or larger?

    In my CSS I’ve tried setting the font size as % or ems but the results haven’t been very good. The font size begins to shrink then suddenly gets larger again. My graphics & pics adjust nicely, but not the fonts for the text below the picture. You can see my latest attempt here:
    http://loriphotos.com/confidential/LoriYogaWeb/index1140_wide.html

    Thanks!

    #87600
    hero
    Member

    Have you looked into media queries. That should do the trick for you. Its a CSS approach to adjust elements based on your screen resolution. The alternative is a jquery snippet.

    http://www.alistapart.com/articles/responsive-web-design/

    #87601
    hero
    Member

    Here is for mobile. There is also a way to check for the screen orientation to adjust the page for iPads in horizontal view.

    @media screen and (max-device-width: 480px) {
    h3 { font-size: 1.2em;
    }

    #87605
    webfriend
    Member

    Thanks for the links, I really appreciate the information. I’ve found the weak points in my code and made a noticeable improvement. There’s always more to learn.

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