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

Issue in using cascading style sheet(CSS) in coldfusion

New Here ,
Jun 28, 2007 Jun 28, 2007

Copy link to clipboard

Copied

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.

Views

575

Translate

Translate

Report

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
New Here ,
Jun 29, 2007 Jun 29, 2007

Copy link to clipboard

Copied

send your source code to know where you did the mistake.

Votes

Translate

Translate

Report

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
New Here ,
Jul 01, 2007 Jul 01, 2007

Copy link to clipboard

Copied

Please find attached the source code for ur reference. Thanks in advance

Votes

Translate

Translate

Report

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
LEGEND ,
Jul 02, 2007 Jul 02, 2007

Copy link to clipboard

Copied

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

And is this path correct for the CSS file, relative to the URL in the
address bar of the browser?

--
Adam

Votes

Translate

Translate

Report

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
New Here ,
Jan 20, 2024 Jan 20, 2024

Copy link to clipboard

Copied

LATEST

The answer is to lose the end-slash from the link. Minor as it seems, that will fix the issue, as long as the href is correct

Votes

Translate

Translate

Report

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
LEGEND ,
Jun 29, 2007 Jun 29, 2007

Copy link to clipboard

Copied

> 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

Votes

Translate

Translate

Report

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
Contributor ,
Jul 02, 2007 Jul 02, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Documentation