SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Rusted & Weathered HumanClay's Avatar
    Join Date
    Sep 2000
    Location
    Milwaukee, WI
    Posts
    225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I am using CSS to define the appearances of fonts on my site, should I still include the font tags or not?

    i.e. my style:

    .small {
    font-family: Arial, Helvetica;
    font-size: 10pt;
    color: #000000
    }

    then,

    <span class="small">this is my style !!</span>

    Should I include <font size=2 face=Arial> in there or not?
    Steve Caponetto - [profile] [e-mail]
    CreedFeed.com - feed your need for Creed!

  2. #2
    SitePoint Zealot Lor's Avatar
    Join Date
    Mar 2001
    Location
    cambridge, MA
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using the stylesheet allows you to have the specific font style that you want without including the font tags.

    If you are using different font styles etc - just set the various classes defining each style and then specify that class with whatever area you want.

    I hope this makes sense

  3. #3
    Rusted & Weathered HumanClay's Avatar
    Join Date
    Sep 2000
    Location
    Milwaukee, WI
    Posts
    225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I meant should I include the font tags in there to insure those w/out CSS can still see the font I intend to display the page with? Or is that not necessary?
    Steve Caponetto - [profile] [e-mail]
    CreedFeed.com - feed your need for Creed!

  4. #4
    SitePoint Zealot Lor's Avatar
    Join Date
    Mar 2001
    Location
    cambridge, MA
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, sorry - my misunderstanding.

    I think that is a personal choice really. Depends on the site too I would presume. If it definitely needs the font specifications you've given in the CSS, then add in the font tags.

    Personally, I dislike using Times on my sites, so I make sure I have it all set to verdana or arial - in the CSS and with font tags.

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HC...

    using the FONT tag would depend on whether or not you are using strange font styles.

    For example, this:

    body, table, tr, td, div {font-family: verdana; font-size: 10pt; }

    will style EVERY instance of text on a page in 10pt verdana. That method will work perfectly in IE AND NS. If you want to colorize the text then do this:

    .special { color: #cc0000; }

    and call it like this:

    <span class="special">This text is red</span>

    That method ALSO works in IE AND NS.

    Just keep in mind that Netscape's main troubles with stylesheets is it inability to correctly inherit properties from the parent element. For example:

    p { font-family: times; color: green; font-size: 15pt; }
    i {font-family: verdana; color: blue;}

    <p>
    This is text in a paragraph. It is merely filler. This is text in a paragraph. It is merely filler. This is text in a paragraph. It is merely filler. <i>This text should be italicized, verdana and blue.</i> This is text in a paragraph. It is merely filler. This is text in a paragraph. It is merely filler.
    </p>

    Now, when tags are nested like this, NS has problems inheriting the style of the parent. Using this example, the italicized text should be 15pt type. But in situations like this NS will not inherit the size of the parent element (the <P> tag).

    (this might work in NS. I am just using it as an example)

    Do you see? Most of your font declarations will work just fine in Netscape as long as you take a little time to plan.

    Besides, the whole point to stylesheets is to get rid of bloated redeundant code. Using the FONT tag defets that purpose.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    Rusted & Weathered HumanClay's Avatar
    Join Date
    Sep 2000
    Location
    Milwaukee, WI
    Posts
    225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Lor and creole.
    Steve Caponetto - [profile] [e-mail]
    CreedFeed.com - feed your need for Creed!


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
  •