SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Help! Netscape and externally linked stylesheets

    I hope someone can help me. Look at this simple externally linked stylesheet in what will eventually be my rebuilt personal site:

    BODY {

    background-image:
    url(pix/gspot_bkgd.gif);
    background-attachment: fixed;
    background-position: 100%
    100%;
    background-color : transparent;
    font-size : 12px;
    font-family : 'Tempus Sans ITC', Arial, Verdana, sans-serif;
    color : #800080;
    }

    A:link {text-decoration: underline; color:#6600ff; }
    A:visited {text-decoration: underline; color:#6633ff; }
    A:active {text-decoration: none; color:#ff0066; }
    A:hover { text-decoration: none; color:#AA33AA; }

    This is linked by the following tag:

    <LINK REL="STYLESHEET" TYPE="text/css" HREF="gspot_style.css">

    This works just fine with IE and Opera. I know Netscape doesn't recognise some things but what concerns me is that it completely ignores font-size, font-family, and color in the BODY section of the style sheet.

    Does anyone know how to help me avoid having to use the dreaded <font> tag in my HTML to cater for Netscape users?

    All I want to do is avoid cluttering my documents by putting <font face=Tempus Sans ITC, Arial, Verdana, sans-serif" color="#800080"></font> around every piece of text!

    To see what I mean, try http://sangrea.net/gspot/mood.php in both IE and Netscape. I will be slobberingly grateful for any help.

  2. #2
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i almost never use BODY.

    use TABLE instead, because browsers don't use table text with the body sheet.

    is this what you mean?

    PS Netscape 4 doesn't recognize barely ANY css

  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Clarifying your answer

    Thx Geiger - that's great :-) I just tried using the sylesheet on a piece of text outside of a table and Netscape v4.5 actually likes it.

    I'd been looking at a linked stylesheet downloaded from the web which did work in NS4 and I couldn't quite make sense of it. Now it makes sense.

    I had a fiddle with this (ahem), and for the benefit of anyone else wanting to know how one solution goes (there may be others?), what I needed to do was specify a class for the <td> tag. It didn't work when I specified the class to the <table> tag. So the coding went a bit like this:

    <table>
    <tr>
    <td class="cell2">
    etc

    And added this code to my linked style sheet:

    .cell2 {
    padding:0;
    padding-left:0;
    font-size : 16px;
    font-family : Tempus Sans, Arial, Helvetica, sans-serif;
    color : #700070;
    }

  4. #4
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    remember that you don't have to specify classes at all. you just write "table" and not ".table"

    the rest is automatic.

  5. #5
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is something that's been annoying me, long and hard! I had more or less resigned myself to not seeing my fonts in NN4.x the way they were meant to be. It was most queer that there didn't always seem to be a pattern. Some tables would work; others wouldn't. So I tried GEIGER's fix. Replaced BODY with TABLE. And, guess what? For me it didn't work. The only difference was that the background colour outside the tables changed to Browser Default- Grey! So I hit the old Undo and piddled around, trying this and that, thinking, as I usually do that I'd got the idea wrong. What I came up with is this :

    body { background-color : #FFFFFF ;
    font-family : hevetica, arial, sans serif ;
    font-size: 12px ;
    color : #000000 ;
    border-color : #FF0000 }

    td { font-family : hevetica, arial, sans serif ; font-size: 12px ;
    color : #000000 }

    Sort of a double statement. Works for me! Thanks Geiger! (Mind you, I haven't tested it to see if it's caused problems elsewhere. Can't see how it should.)
    aaah...west and weewaxation at wast!

  6. #6
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    haha don't blame me for a problem that isn't mine! :P

    about that background color- that's because you never specified it in your actual body tag. it turned grey because your css used to tell it to turn white- instead of specifically telling the TEXT to, it told the body to. you see?

    if that TD really works, that's great. i'd use it myself now. quite odd, you're right!

  7. #7
    Posts rarely lloydi's Avatar
    Join Date
    Jan 2002
    Location
    Swindon UK
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To solve general problems with Netscape, ingeritence etc, I tend to use the following tact:

    Group all likely text containers together and specify fonts and colours -

    BODY,TD,TH,SPAN,DIV,BLOCKQUOTE {font-family:verdana;color:blue;background:white;}

    Then treat BODY separately to set main BG colour:

    BODY {background:white; color:blue;}

    Then I would probably uses classes to make sure font sizes are OK (otherwise if you specify a TD with a font size of 75%, any nested TDs will apply 75% on top of 75% etc and you get really small text)

    Not sure if this helps at all. But I'm off to the pub soon, so what do I care?
    Build Your Own Web Site the Right Way!
    A beginners' HTML/CSS book with web standards at its heart
    The Ultimate HTML Reference
    A complete reference, in glorious hardback


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
  •