SimpleHTTPServer, external CSS, and Google Chrome

Discussion in 'Python' started by Justin Ezequiel, Sep 17, 2010.

  1. I am running "python -m SimpleHTTPServer 80" on Windows XP Pro SP 3
    (Python 2.5.4)

    browsing http://localhost/ using IE8 and FireFox 3.6, I get blue text
    on red background
    on Google Chrome 6.0 however, I get blue text on white background
    placing index.htm and styles.css (see below) under IIS, I get blue
    text on red background for all browsers,
    including Google Chrome 6.0.

    I get exactly the same results when browsing from another machine.
    what's wrong? what do I need to change in SimpleHTTPServer?

    index.htm
    --------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>your title</title>
    <meta http-equiv="Content-Type" content="text/
    html;charset=ISO-8859-1">
    <link rel="stylesheet" href="styles.css" type="text/css">
    <style type="text/css">
    body {
    color: blue;
    }
    </style>
    </head>
    <body><p>foo bar</p>
    </body>
    </html>
     
    Justin Ezequiel, Sep 17, 2010
    #1
    1. Advertisements

  2. Justin Ezequiel

    MrJean1 Guest

    FWIW,

    There is a blue text on a red background in all 4 browsers Google
    Chrome 6.0.472.59, Safari 5.0.1 (7533.17.8), FireFox 3.6.9 and IE
    6.0.2900.5512.... with Python 2.7 serving that page on my Windows XP
    SP 3 machine.

    /Jean
     
    MrJean1, Sep 17, 2010
    #2
    1. Advertisements

  3. Hmm.
    Will download and install newer python versions to re-check then.
    Thanks.
     
    Justin Ezequiel, Sep 20, 2010
    #3
  4. Justin Ezequiel, Sep 20, 2010
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.