SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Wishful Thinking webmasternovis's Avatar
    Join Date
    Jul 2002
    Location
    England
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Not Applied In Firefox

    Hi all,

    I made a table formated with CSS which works perfectly in IE. However, in Firefox none of the styling is shown. Does anyone know why this is? Here is some of the code:

    HTML Code:
    <td style='background-color:25496D; padding:6px; color:FFFFFF; font-weight:bold; width=80%;'>Instruction</td><td style='background-color:25496D; padding:6px; width=80%; color:FFFFFF; font-weight:bold;'>Distance</td>
    Anyone know?

    Thanks,
    Mike

  2. #2
    SitePoint Evangelist
    Join Date
    Jul 2006
    Posts
    493
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    background-color:25496D should be background-color:#25496D
    color:#FFFFFF; and so on

  3. #3
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and width=80&#37; should be width:80%, no equal sign within your style declaration. IE is more forgiveable to incorrect syntax than any other browser I know of. It's always worth to validate your css and html
    Dan G
    Marketing Strategist & Consultant

  4. #4
    Beer Monster -Ox's Avatar
    Join Date
    Apr 2003
    Location
    sowth afreeka
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ultimatly you want to formatt you CSS correctly and apply it correctly, the more idea manner of doing this would be as such

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html>
    <head>
    <title>Untitled</title>
    <style type="text/css">
        table.results {
            width: 80%;
        }
        table.results tbody tr td {
            background-color: #25496D; 
            padding:6px;
            color: #fff;
            font-weight: bold;
        }
    </style>
    </head>
    
    <body>
    <table class="results">
        <tbody>
            <tr>
                <td>Instruction</td>
                <td>Distance</td>
            </tr>
        </tbody>
    </table>
    
    </body>
    </html>
    remember you can also use 3 charactors for colours such as ffffff shorten to fff

    Hope that helps a little
    My postings are a natural product.
    The slight variations in spelling and grammar enhance its
    individual character and beauty and in no way are to be
    considered flaws or defects - http://www.guinnesspig.net

  5. #5
    Beer Monster -Ox's Avatar
    Join Date
    Apr 2003
    Location
    sowth afreeka
    Posts
    374
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.cssbasics.com/ is a good place to learn the basics of CSS
    My postings are a natural product.
    The slight variations in spelling and grammar enhance its
    individual character and beauty and in no way are to be
    considered flaws or defects - http://www.guinnesspig.net


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
  •