SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: bolding text

  1. #1
    boiler up blackdog's Avatar
    Join Date
    Jul 2002
    Location
    Purdue
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    bolding text

    the way i've made text bold in the past was like this:
    .heading { font-family: Arial, Helvetica, sans-serif; color: #000000; font-size: 14px; font:900;

    i just noticed this doesn't work in netscape. is there something i'm doing wrong?
    thanks

  2. #2
    SitePoint Zealot LiamW's Avatar
    Join Date
    Mar 2003
    Location
    Hamilton, Ontario
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To have it cross browser use

    font-weight : bold;


  3. #3
    SitePoint Addict
    Join Date
    Dec 2002
    Posts
    386
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yet another example of poor implementation in IE...
    really if you look at the line of code why would you expect something to work when you are breaking a rule you have already used twice in the statement...
    font-size
    and
    font-family

  4. #4
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fwiw, the font shorthand attribute requires at least two values to be set in order to function/validate.

    Code:
    .heading {
    font: 900 14px Arial, Helvetica, sans-serif; /* this will validate and work as it contains three attributes */
    color: #000000;
    }
    (Note: For some reason, the font-weight part of the shorthand declaration needs to precede the rest. Don't know why.)


    Also, calling the font shorthand attribute after a specific font attribute (such as font-family) will cause earlier 'verbose' (read: longhand) declarations to be ignored in some (compliant?) browsers.

    The correct specific font attribute for use with 900 is font-weight.

    Code:
    .heading {
    font-family: Arial, Helvetica, sans-serif;
    color: #000000;
    font-size: 14px;
    font-weight: 900;
    }
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


Bookmarks

Posting Permissions

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