Click to See Complete Forum and Search --> : external CSS


div1
04-10-2003, 04:26 AM
How would i get an external css to load without using javascript, that is if a browser or user disabled javascript how could i get that file still do the job without having to add all its contents into the page itself?

Any ideas????

gil davis
04-10-2003, 05:43 AM
There is no direct connection between external CSS style sheets and javascript, unless you are using js to write the <LINK> tag dynamically.

apezVal
04-10-2003, 05:47 AM
Hi DIV1,

The link to an exterior CSS .css file needs only HTML head elements to get the cascade initialized by the parser-browser, try this with your .css file propely formated (this can be validated at the W3 wed-site) and properly linked to it should generate the style as the page is parsed:

<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>

The META tags are like parser "grease" for this. If js is implemented add some variations of this general set to get the js initialized in the parsing cascade-tree.The META tags are like parser "grease" for this. If js is implemented add some variations of this general set to get the js initialized in the parsing cascade-tree.
__ JHG

div1
04-10-2003, 08:35 AM
Puting the css ref in the <link> tag worked great, thanks to you all for responding.:D