Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Guest
Dec 30, 2012 Dec 30, 2012

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?

692
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2013 Jan 01, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources