Skip to main content
Participant
June 29, 2007
Question

Issue in using cascading style sheet(CSS) in coldfusion

  • June 29, 2007
  • 3 replies
  • 681 views
I have installed coldfusion in my machine recently. The thing is that my cfm files are not recognising the classes of the linked style sheets though I have given the correct path of the location of css file. Also it couldn't recognise <img src=""> tag to display an image.
Please help me out to solve this issue.
    This topic has been closed for replies.

    3 replies

    Inspiring
    July 3, 2007
    Does this work if you make it an HTML page?
    Also, are you doing this on your live site or on your dev site (ie local computer)?
    1 mistake I've seen that is so obvious sometimes it gets overlooked, is that you need to upload your stylesheets etc to the production server and then make sure that the path is still correct in your cfm file. Do a view source to see what the actual path to your stylesheet is as far as the site is concerned. It may have something like "c:\mysite\style.css" meaning it is looking for it on YOUR computer.
    Inspiring
    June 29, 2007
    > I have installed coldfusion in my machine recently. The thing is that my cfm
    > files are not recognising the classes of the linked style sheets though I have

    CFM files are disinteresting in HTML, CSS classes and links and that sort
    of carry-on. It's all just "noise" to CF. So your CFM template cannot, in
    and off itself, cause problems with your CSS stuff.

    What you need to do is to look at the generated HTML and see what you're
    doing wrong. I imagine you've got the URLs wrong. Bear in mind that LINK
    URLs are indeed URLs, and if you're using relative ones, they should be
    relative to the URL of the request, and have no bearing on the file
    location of the CFM file they are represented in. This is a common mistake
    nebies make.

    --
    Adam
    Participant
    June 29, 2007
    send your source code to know where you did the mistake.
    Participant
    July 2, 2007
    Please find attached the source code for ur reference. Thanks in advance