www.webdeveloper.com
Results 1 to 4 of 4

Thread: external CSS

  1. #1
    Join Date
    Apr 2003
    Location
    Uk
    Posts
    4

    Talking external CSS

    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????

  2. #2
    Join Date
    Nov 2002
    Posts
    4,473
    There is no direct connection between external CSS style sheets and javascript, unless you are using js to write the <LINK> tag dynamically.

  3. #3
    Join Date
    Apr 2003
    Posts
    34

    exo-linking

    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

  4. #4
    Join Date
    Apr 2003
    Location
    Uk
    Posts
    4

    Cheers guys!

    Puting the css ref in the <link> tag worked great, thanks to you all for responding.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles