Stylesheet not respected

Suren surendra.lingareddy at
Wed Oct 25 00:53:42 CEST 2006

I was able to the see weird stylesheet behavior on opera, IE and
mozilla under
mod_python. Here is some python code that exhibited the behavior. I
have the body.css in the same folder as this file and the background is

set to blue. When I access it at http://localhost/, the html
page shows Hello World with no blue background.

If i view source, copy into test.html, launch it in browser, everything

is good. Does the lack of .html extension in the address bar cause

from mod_python import apache
def handler(req):
        req.content_type = 'text/html'
                <title>Hello World</title>
                <link href="body.css" type="text/css" rel="stylesheet"
                Hello World

If I inline the style, it works fine. Any ideas why this happens?

More information about the Python-list mailing list