Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2003
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Overall Page text size...

    Hello everyone...

    I've got a seemingly simple question.. but l can't seem to find the answer l'm looking for anywhere, thought one of you experts would be able to point me in the right direction.
    ------------------------------------

    I'm looking to make the font on my entire webpage automatically set to the "smaller" text size setting... regardless of what the user has their "text size" set to in their browser.

    So no matter what their "text size" setting is, l want the text to appear as "smaller"...and l want this to span across all text on the entire HTML document.

    Would it be something like this?

    <style>
    {font-size:smaller}
    </style>

    Any help would be greatly appreciated!!

    Thanks

    ~JSlime

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you want to set an initial font size as smaller than default, use a percentage, eg:

    p { font-size:80%; }

    But it won't be regardless of the user's font setting, it will a proportion of default, which will be bigger or smaller for invidual users. You can't force a particular font size, except in IE by using pixel, but that's not a good idea.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ideally, IE would support scaling in font sized in pixels, but no. What I normally do is:
    Code:
    body, html { font-size: 16px }
    div#content { font-size: smaller }
      /*which is a bit smaller than 16px, but still scalable.*/
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •