Skip to main content
December 30, 2012
Question

Why doesn't my css styleing or images show in CF10?

  • December 30, 2012
  • 1 reply
  • 707 views

I just installed cf10, in developer mode with the stand alone server, on my window7 machine. I can access the admminstrator/index.cfm or homepage.cfm from CF and they view fine. When I access one of my previously generated index.cfm page, none of my external css stylesheet settings work. Infact I tried adding the css setting directly and linked an image directly, nothing is showing.

This is my path: C:\ColdFusion10\cfusion\wwwroot\CFIDE\HTML\clarkmedia\index.cfm

What am I doing wrong?

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    January 1, 2013

    To start with, CFIDE is a ColdFusion system directory. So you should not be developing code in it. I would strongly suggest you move your code, that is, the HTML directory, one level lower, to:

    C:\ColdFusion10\cfusion\wwwroot\HTML\clarkmedia\index.cfm

    To view that page, direct the browser to

    http://localhost:8500/HTML/clarkmedia or http://localhost:8500/HTML/clarkmedia/index.cfm

    Now, suppose your style sheet and image are, respectively, C:\ColdFusion10\cfusion\wwwroot\HTML\clarkmedia\style\myStyle.css and C:\ColdFusion10\cfusion\wwwroot\HTML\clarkmedia\images\myPic.jpg. Then you could use something like

    <link rel="stylesheet" href="/HTML/clarkmedia/style/myStyle.css" type="text/css">

    and

    <img src="/HTML/clarkmedia/images/myPic.jpg">