Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Included cgi does not get CSS formatted?

by ww (Bishop)
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 w3c.org, w3cschools.org, etc.


Comment on Re: Included cgi does not get CSS formatted?
Select or Download Code
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.

    w3cschools.org

    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-09-22 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls