0

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

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by ravie14
0

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

0

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 :)

0

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.