Skip to main content
Known Participant
August 12, 2013
Question

question?

  • August 12, 2013
  • 1 reply
  • 382 views

Hi,

my page can't find the css for fc if i included them within the header, but it found and wokred fine if i have them within cfinlude tag?

<head>
<title>Document</title>
<!--- <script type="text/javascript" src="js/showHide.js"></script> 
<link rel="stylesheet" type="text/css" href="css/style.css"/>--->
</head>

<cfinclude template="js/showHide.js" >
<cfinclude template="css/style.css" >

thanks

    This topic has been closed for replies.

    1 reply

    Carl Von Stetten
    Legend
    August 12, 2013

    Is the "css" folder an actual folder right on the webroot?  Or do you have a ColdFusion mapping created for "css"?

    Normally, the web server (IIS, Apache, etc.) will serve the static resources like .css and .js files, as long as they are web-accessible.  ColdFusion doesn't even need to be involved.  However, if the files are not web-accessible (like in a folder above the web root or elsewhere), and ColdFusion is able to see them using a mapping, then you need to create is a virtual directory on your web server to point to the same place as your ColdFusion mapping.  Then your web server can serve up those resources.

    HTH,

    -Carl V.