Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Included cgi does not get CSS formatted?

by ww (Archbishop)
on Apr 07, 2009 at 02:18 UTC ( #755913=note: print w/replies, xml ) Need Help??

in reply to Included cgi does not get CSS formatted?

Assuming html 4.01 (loose or strict), your head section needs these:

<meta http-equiv="Content-Style-Type" content="text/css"> <link rel="stylesheet" type="text/css" href="/css/foo.css">

Note type is 'text/css', not 'text/html' (single or double quotes, your choice), and the link rel line, which you can do manually, or find the appropriate CGI method in the docs.

You may gain more insight by reading the html in the .inc file or at,, etc.

Replies are listed 'Best First'.
Re^2: Included cgi does not get CSS formatted?
by dorward (Curate) on Apr 07, 2009 at 08:45 UTC
    <meta http-equiv="Content-Style-Type" content="text/css">

    You only need this if you use the style attribute - and you are usually best off avoiding that in favour of real stylesheets.

    W3Schools is unfortunately popular. It seems to get a lot of traffic by trading off the closeness of its name to that of the W3C and a significant number of people are surprised to find that they aren't the same organisation.

    Sadly, it is more than a little error prone and its examples have a tendency to run as far away from best practice as possible.

    The specifications at the W3C are good, and Opera has a good set of tutorials. I would suggest using these instead.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://755913]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-12-15 17:54 GMT
Find Nodes?
    Voting Booth?
    How many stories does it take before you've heard them all?

    Results (70 votes). Check out past polls.