Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

style sheets not being applied in firefox 3

Status
Not open for further replies.

chedderslam

Programmer
Jun 16, 2008
24
US
I have just developed a site from a template that uses a couple of style sheets.
The site renders fine in chrome and ie, but not firefox. I am using stylesheets
with a .cfm extension, something I am trying the first time, because they use
image references and I wanted to make them dynamic. Could that be causing the
issue or is it something else?

Here are the tags referencing the style sheets. Hopefully you guys can spot what
I am doing wrong.

<link href="/version0dot2/includes/rel="stylesheet" type="text/css" />
<link href="/version0dot2/includes/rel="stylesheet" type="text/css" />
<base href="
 
Hi

That is invalid HTML, so do not expect to get consistent behavior across browsers.
HTML 4.01 said:
When present, the BASE element must appear in the HEAD section of an HTML document, before any element that refers to an external source.

Try this :
Code:
<base href="[URL unfurl="true"]http://mysite.com/version0dot2/">[/URL] 
<link href="/includes/[URL unfurl="true"]www_mysite_com/layoutfiles/style.cfm"[/URL]
rel="stylesheet" type="text/css" />
<link href="/includes/[URL unfurl="true"]www_mysite_com/layoutfiles/layout.cfm"[/URL]
rel="stylesheet" type="text/css" />

Feherke.
 
Wow, I did not know that the reference was ordinal. Thanks for the help, I will give it a try.
 
Hi

Uhm, actually the [tt]href[/tt]s you want to be affected by [tt]base[/tt] [tt]href[/tt] should be relative, so logically this should have more chance to work :
Code:
<base href="[URL unfurl="true"]http://mysite.com/version0dot2/">[/URL]
<link href="includes/[URL unfurl="true"]www_mysite_com/layoutfiles/style.cfm"[/URL]
rel="stylesheet" type="text/css" />
<link href="includes/[URL unfurl="true"]www_mysite_com/layoutfiles/layout.cfm"[/URL]
rel="stylesheet" type="text/css" />
Anyway, for further suggestions, if needed, would be better to know about the paths.

Feherke.
 
Hi

There is no HTML error. Is HTTP. Your style sheets are delivered with this HTTP header :
Code:
Content-Type: text/html; charset=UTF-8
Adjust your web server or server-side script to send [tt]Content-type: text/css[/tt].

So Mozilla is right : there is no reason to use those as CSS. Explorer always forgave such mistakes. I am disappointed that Chrome also does.

Feherke.
 
Will reverting to a .css extension solve the issue? This is a shared host and I do not believe that they will make the change.

Thanks for the help.
 
Hi

chedderslam said:
Will reverting to a .css extension solve the issue?
Probably not.

Are those files really ColdFusion scripts ? If yes, try to add this :
Code:
<[url=http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-a17.htm]cfcontent[/url] type="text/css" />

Feherke.
 
Yes, that would seem to make sense. I have not used the cfcontent tag. Would I put it at the top of the style.cfm and layout.cfm pages or would I wrap the reference to them in the page that is calling them?
 
Hi

chedderslam said:
Would I put it at the top of the style.cfm and layout.cfm pages or would I wrap the reference to them in the page that is calling them?
Copy what I put in the CODE box at the beginning of both files. Probably the restriction is like in other CGI scripts : to be called before outputting the content. ( I have no idea about ColdFusion. Ask in forum232 if more help is needed. )

Feherke.
 
I have it working now. Thank you SO MUCH for all the help. I really appreciate it.
 
If you found his post to be valuable, maybe you should give him a star then. You can click on the > Thank member
for this valuable post! < link at the end of the valuable replies.

If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Thank you, I have gone through and starred all the helpful posts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top