Re cant change background color using external style sheet

Discussion in 'HTML' started by Simon, Feb 25, 2005.

  1. Simon

    Simon Guest

    I cant change background color using my external style sheet title
    teststylesheet.css

    <style type="text/css">
    body { background-color: black;}
    </style>


    And in the document I have the link

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <head>

    <title>Test</title>


    <link rel=" stylesheet " type="text/css" href="teststylesheet.css" />

    </head>

    <body>
    the test is not working

    </body>
    </html>


    I have been through this and I can"t find anything wrong can any one
    help
    Regards
     
    Simon, Feb 25, 2005
    #1
    1. Advertising

  2. Simon

    Steve Pugh Guest

    (Simon) wrote:

    >I cant change background color using my external style sheet title
    >teststylesheet.css
    >
    > <style type="text/css">
    > body { background-color: black;}
    > </style>


    Why do you have HTML in your CSS file?
    Get rid of the HTML and just keep the CSS.

    I hope that you'll real stylesheet sets a color as well. Always set
    color and background-color together to avoid clashes with user
    stylesheets.

    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


    Here you say that it's HTML ...

    ><link rel=" stylesheet " type="text/css" href="teststylesheet.css" />


    .... and here you use XHTML syntax.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Feb 25, 2005
    #2
    1. Advertising

  3. Simon

    Guest

    Many Thanks Steve works a treat now

    Kind Regards
     
    , Feb 25, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harold A. Mackey

    Visual Studio external style sheet problems

    Harold A. Mackey, Mar 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    467
    Eliyahu Goldin
    Mar 7, 2005
  2. cmonsta
    Replies:
    1
    Views:
    647
    Patrick Olurotimi Ige
    Mar 8, 2005
  3. John Seeliger
    Replies:
    6
    Views:
    6,651
  4. Nagaraj
    Replies:
    1
    Views:
    922
    Lionel B
    Mar 1, 2007
  5. ML
    Replies:
    0
    Views:
    337
Loading...

Share This Page