![]() |
| Please Help! Style sheets and Coldfusion |
|
drandalray
|
Hello,
I've been beating my head against a wall and it hurts. Please help me. How do you include (ie. LINK) style sheets in ColdFusion (using Dreamweaver MX) I've seen some mention that you should use CFINCLUDE but when I try that, I only see a rendered page with the CSS coding displayed as the text of the page. I've tried this approach using both STYLE.CSS and STYLE.CFM. Here is my current 'configuration': - Application.cfm - Index.cfm (includes Navigation.cfm via CFINCLUDE) - Navigation.cfm (included in Index.cfm) The file I am attempting to apply styles to is Navigation.cfm. To complicate things even more, the style sheets work great when I embed them in Navigation.cfm. But when I export the embedded styles to create an external style sheet and then LINK the external style sheet in Navigation.cfm, the styles no longer have any affect on the page. I'm very frustrated and confused. Please help me. Thanks. |
||||||||||||
|
|
|||||||||||||
|
webweaver6
|
When using the cfinclude, I have found that the included file should not have any header or body info, just the html and cfm of what you are trying to include. Otherwise, if you view the source, you'll see the html, head, body tags, then the html, head, body tags again, then the closing of all of those. I think if you include the link to your css file in the index.cfm and the other main files in the site you'll have the styles applied.
|
||||||||||||
|
|
|||||||||||||
|
byron
Forum Admin
|
This is what the html look like to link to a style sheet, just put this somewhere in the header of your html for the page you are trying to apply the style to.
<link rel="stylesheet" type="text/css" media="screen" href="/css/lite.css" /> Make sure you have the pathway correct to your .css file. In this instance I'm using a absolute path, so the pathway to the .css file would be this: http://mydomain.com/css/lite.css Otherwise the file will not be found and no style applied to the page. |
||||||||||||
|
|
|||||||||||||
| Please Help! Style sheets and Coldfusion |
|
||
|


