Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    adj
    adj is offline
    New to the CF scene
    Join Date
    Jun 2007
    Location
    Herault, southern France
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    elementary css:firefox and IE won't read colour mark-up

    Beginning html, I wrote the file below from a w3 tutorial (referenced at end), and Firefox and IE read the file but do not respond to the style statements - what am I doing wrong please ? (sorry it's such an naive question)

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html>

    <head>
    <title>My first styled page</title>
    <style type="text/css">
    body (
    color: "purple";
    background-color: #d8da3d
    }
    </style>
    </head>


    <body>

    <!-- Site navigation menu-->
    <ul class="navbar">
    <li><a href="index.html">Home Page</a></li>
    <li><a href="musings.html">Musings</a></li>
    <li><a href="town.html">Toytown</a></li>
    <li><a href="links.html">Links</a></li>
    </ul>


    <!-- Main Content -->
    <h1>My first-and-a-half Styled page</h1>

    <p>Welcome to this first and a bit attempt including colour !</p>

    <p>It lacks images, but at least it has style.
    And it has links even if they don't go anywhere&hellip; </p>

    <p>There should be more here, but I don't know what yet.</p>

    <!-- Sign and date the page, it's only polite! -->
    <address> Copied by me, adj,<br> on 5 June 2007 from W3C Style examples tutorial http://www.w3.org/Style/Examples/011/firstcss.en.html.</address>

    </body>
    </html>

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    <style type="text/css">
    body (
    color: "purple";
    background-color: #d8da3d
    }
    </style>

    Should read:

    <style type="text/css">
    body {
    color: purple;
    background-color: #d8da3d
    }
    </style>
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •