CSS on a subsite not applied in FF and Chrome, works in IE

Hello,
I have come across a strange issue. We are running MOSS (MS Office Sharepoint Server) public sites (pulishing sites).
The structure is following:
www(dot)xxxxxxxx(dot)biz - CZ page - this works OK. I have a Master page saying

<style type="text/css">
@import url(/Style Library/navertica.css);
</style>

and it works in all browsers.

In subsequent sites, i. e. English, under www(dot)xxxxxxx(dot)biz/en, I have the adjusted statement:

<style type="text/css">
@import url[B](/en[/B]/Style Library/navertica.css); (the style library is in each site)
</style>

And that is the difference - the subsite, in Internet Explorer, works, but in other browsers, the css file is not applied at all.

I suppose there would be some error in the css or in relative adressing, but can not figure it out. Any help would be GREATLY appreciated

Thanks a lot!
Marek

I assume there is only 1 css file? paths are defined relative to the file, so if you have a file under /en/ and say / is your root, you would then need to have a path like ../ (i.e. go up 1 path).

the relative path as the files will interpret are fully expanded going to be looking for /en/en/navertica.css with the way you have it.

hope that helps

I assume there is only 1 css file? paths are defined relative to the file, so if you have a file under /en/ and say / is your root, you would then need to have a path like ../ (i.e. go up 1 path).

the relative path as the files will interpret are fully expanded going to be looking for /en/en/navertica.css with the way you have it.

hope that helps

Hello, sillyboy,
that is strange - anyway, Fiddler did not miss the file even using /en/styles library...

Anyway, I have just solved it thanks to SuzyUK from another forum using this

<!--	
	<style type="text/css">
	/**** Overriding styles for branding ~ located in the CSSSTyleLibrary ****/	
	@import url(/en/Style library/navertica.css);
	</style>
		 -->

<link rel="stylesheet" href=/en/Style%20Library/navertica.css type="text/css" media="screen" charset="utf-8"> (not sure why @import does not work).

Thank you for your help :)

another possible failure point appears to be the 'space' in 'style Library'
in the no-fail url the space is encoded %20, http does not 'like' unencoded spaces

another possible failure point appears to be the 'space' in 'style Library'
in the no-fail url the space is encoded %20, http does not 'like' unencoded spaces

Hello,
this did not help previously. However, thanks to another forum, I figured it out. The browsers did not accept @import url, I had to set this via link rel.

Anyway, thank you for your help :)

Kind regards,
Marek

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.