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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts

    small font size and bold and arial face

    Please advise why I cant get bold to work with font size -2 and face Arial, Helvetica, sans-serif? If I change my font size to -1 it works. But it doesnt seem to work with -2.

    Code:
    <font size="-2" face="Arial, Helvetica, sans-serif"><strong>information here</strong></font>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The FONT tag is obsolete and should never be used for any new pages or for any updates to any existing pages.

    Code:
    <style type="text/css">
    .emphasized 
        {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 50%;
        font-weight: bold;
        }
    </style>
    
    ....
    
    <span class="emphasized">information here</span>
    Obviously you can change the percentage for "font-size" to make it larger or smaller or you can change it to EM, PX or PT units for more precise control of it's size.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #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
    Or even better, figure out *why* you're trying to make the text smaller, and use a better tag than span.

    Example: it's a quote from another page, so use <blockquote> or <q> depending on whether it's an inline quote or a block level quote.
    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!

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kansas, USA
    Posts
    487
    Thanks
    0
    Thanked 54 Times in 53 Posts
    *ahem* Now to actually answer the question.

    Depending on your operating system and browser, some fonts will have a size below which they cannot be displayed in boldface. For Arial it is about 10px (or -2 using your font tag).

    You can use the CSS methods described above to gain greater control over your font size using percentages or fixed pixel sizes. This yields better results than what the deprecated font tag offers.

    If you have a real need to make text very small and still distinguishable between normal and boldface, you might consider rendering the text as a graphic image.


  •  

    Posting Permissions

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