SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict trigger's Avatar
    Join Date
    Jun 2003
    Location
    Eagan
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    any reason a <tr bgcolor> would not work in firefox?

    It works in IE, but not Firefox

    the doctype is
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    and the table code is
    Code:
    <tr bgcolor="#OD2B88">
    is the coding wrong or something, CSS is not a viable solution (for now, but eventually it might), well, maybe inline CSS. This is tabular data that needs to be in a table.
    Not another drugstore, not another town
    Tired of the overdrop, I had to put it down
    You know I was the man when I put the Crown down
    Then rolled around the Chemicals to pave the New Sound

  2. #2
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think recall something about Firefox not rendering bgcolors through (X)HTML, but I'm not sure if that's accurate.

    There's an extension to change that behavior, I think.

    Why isn't CSS viable? If it's tabular data, it should be in a table, yes... but there's no reason you can't use CSS to style the table. If it has to be inline, so be it:

    HTML Code:
    <td style="background-color: #0d2b88;">
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  3. #3
    Also available in Large Si's Avatar
    Join Date
    Sep 2002
    Location
    Walsall, UK
    Posts
    1,911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most browsers have issues with CSS and styling of <tr>'s - I'm sure IE struggles to render <tr style="borderxx"> and Mozilla struggles with any styles on a <tr>. It's a pain but you'll just have to apply it to each <td>.
    Si
    Are you a Photoshop Jedi Master? Prove it!

    Is funky house your bag? You'll love this!

    Voice
    , eyes, ears, body and hands.


  4. #4
    Also available in Large Si's Avatar
    Join Date
    Sep 2002
    Location
    Walsall, UK
    Posts
    1,911
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOPS - I've just thought... if you can use CSS then try giving your <tr> an ID (such as <tr id="firstrow">) and use the following CSS:
    Code:
     tr#firstrow td {
     background-color: #0D2B88;
     }
    That should apply a style to each <td> within the <tr> with minimal code!
    Si
    Are you a Photoshop Jedi Master? Prove it!

    Is funky house your bag? You'll love this!

    Voice
    , eyes, ears, body and hands.


  5. #5
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I obviously wasn't paying close enough attention, I saw td instead of tr.

    I'd say apply the style to all of the table cells in the row. bigsi's example above should do the trick quickly, using CSS.
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  6. #6
    SitePoint Addict
    Join Date
    Mar 2004
    Location
    Europe
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "CSS is not a viable solution"

    It is the only solution and the best solution. The advice above is sage.
    all code tested in:
    FireFox0.9, Opera7.51, Mozilla1.7, InternetExplorer5+6

  7. #7
    SitePoint Guru DCS's Avatar
    Join Date
    Apr 2002
    Location
    Arkansas
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The CSS style applied to <tr> works. I have used it several times in the past


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
  •