SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    Northern Ireland
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Style Sheet Turmoil :-(

    Hello folks

    I'm giving my little hard corner of the Infobahn a long overdue overhaul part of which includes the addition of CSS where feasible.

    The Site is in the rather unusual position of primarily being a depository for sound clips (in fact I believe it's the UK's largest audio archive to any Broadcaster) so even attempting to display so many sound clips is a challenge in itself.

    I'm planning something like this: -
    http://www.dannybaker.force9.co.uk/N...use/index2.htm

    However especially if you're viewing the main content table on an older browser, you're probably noticing a number of display errors. Most noticeably: -

    Older versions of Netscape (certainly Composer 4) have such a pathological dislike for CSS they refuse to play ball and the table looks worryingly like this http://www.dannybaker.force9.co.uk/N...phics/net4.gif

    Can I please pick your collective brains and ask two questions.

    1 - How do I get around the problem of getting Netscape 4 to pick up my CSS attributes?
    I'm aware that's there's very much a price to pay in design terms for backward computability and the only way I could find getting around the same problem for my navigation table was to specify both style sheets and also a background colour for Netscape 4 to pick up. However to do the same for every content table on every page seems crazy?

    2 - I'm afraid as something of a CSS Virgin, I can't get around how to get those table titles which also link to pop up pictures to pick up the correct font colour (white)? (link_title_color.css)

    The page is still very much a work in progress so any other tips or constructive comments I promise to take squarely on the chin

    Cheers in hopeful anticipation

    Andrew

  2. #2
    SitePoint Member
    Join Date
    Feb 2003
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know if this will help you, but one of the tricks with older version of Netscape is to set the class on the <td> instead of the <tr>. In my experience Netscape 4 has a tendency to just ignore styles set on a <tr>.
    ITBHost.com - The web host that cares!
    SciFiWebHost.com - The premier hosting solution for the Science Fiction, Fantasy and Horror community.

  3. #3
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by ITBHost.com
    I don't know if this will help you, but one of the tricks with older version of Netscape is to set the class on the <td> instead of the <tr>. In my experience Netscape 4 has a tendency to just ignore styles set on a <tr>.
    This is a known bug in some older browsers that results in css failing to be inherited into td as they should.
    As you've discovered, you need to explicitly address the td for the css to function.
    New Plastic Arts: Visual Communication | DesignateOnline

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

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    Northern Ireland
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bill & ITBHost.com many thanks for the replies.

    Since I posted my original query I've run my CCCthrough an online checker which has flagged up some errors which I'm working my way through, but I'd welcome any pointers on how to "explicitly address the td for the css to function". or whether there is a work around for for setting the class on the <tr> in Netscape 4?

    Cheers

  5. #5
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Andrew_Sam
    ...I'd welcome any pointers on how to "explicitly address the td for the css to function". or whether there is a work around for for setting the class on the <tr> in Netscape 4?

    Cheers
    Perhaps I made it sound more complex than it actually is.

    I simply meant create a css class for the way you wish your td to appear then just add class="mytdstyle"* to the opening <td> tag.

    (* mytdstyle is just an example name. As long as you use a name that is different to all others and the name as it appears in the css settings matches the name as it appears in the class="...", you'll be fine.)

    Code:
    .mytdstyle {
    border: 1px solid f00;
    background: #fc0;
    }
    
    ...
    
    <table>
    <tr>
    <td class="mytdstyle">...
    ...sort of thing.

    If you want to use the same appearance for all td cells, then use:

    Code:
    td {
    border: 1px solid f00;
    background: #fc0;
    }
    You could also use:
    Code:
    td.mytdstyle {...
    which means that only <td> tags with class="mytdstyle" will use those css settings.

    Hope that helps
    New Plastic Arts: Visual Communication | DesignateOnline

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

  6. #6
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or if you want to do it on TR's, just use this:


    Code:
    tr.blah td {
    /*CSS HERE*/
    }
    (I'm pretty sure that works in NS4)
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    Northern Ireland
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks for the assistance and advice Bill and Cyborg.
    You know what, I think I'm actually beginning to get the hang of this CSS lark (famous last words)


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
  •