7 replies [Last post]
zendakk
zendakk's picture
Offline
newbie
Heidelberg, Germany
Last seen: 18 years 4 days ago
Heidelberg, Germany
Timezone: GMT+1
Joined: 2003-11-27
Posts: 7
Points: 0

Hi everyone,

I'm developing and testing a site locally on Windows XP with Apache 2.
So far everything CSS-related works as expected in various browsers on my local computer (IE 5, IE 6, Opera 7, Mozilla 1.6, Firefox 0.9)

However, on the production server (Linux, Apache 1.3), IE6 ignores certain rules.

See http://www.inflagranti-music.de/bandinfo/

On my local machine, IE6 handles it perfectly. Same browser, different machines - could that be the broblem, and if so, why?

Compare with other browsers and you'll see the differences, especially the footer styling and the images in the content area. It even works fine with IE5. Pretty confusing, as this leads me to suspect that there's nothing wrong with the actual CSS.

Thanks

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE6 ignores certain rules / Server setup?

Hi Zendakk,

Is the problem not with your use of the cdata block to enclose your main CSS import rule, I've not seen it used in this way before ( but forgive me if I am just not up to speed on this usage!)

The use of cdata is problematical for some browsers -so I read- I would suspect that IE chokes on it some how. I use the @import rule for my sheets and they validate to xhtml 1.0 trans no problem.

As I said forgive me if I demonstrate my ignorance.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

zendakk
zendakk's picture
Offline
newbie
Heidelberg, Germany
Last seen: 18 years 4 days ago
Heidelberg, Germany
Timezone: GMT+1
Joined: 2003-11-27
Posts: 7
Points: 0

IE6 ignores certain rules / Server setup?

Hello Hugo,

Thanks, I'd actually taken that into consideration but it doesn't seem to be the problem.
I've tested the following ways of including the style sheet:

  • Simple <link rel="stylesheet" ... >
  • @import rule in style block without CDATA
  • @import rule in style block with enclosing CDATA block (as it currently is)
IE5 and IE 6 handle all variations correctly.

If IE6 had a problem in general with the CDATA block, it would probably not read the css file at all. Most of the formatting shows up, though, which means it interprets the css for the most part. That's what I don't understand. The css file is not corrupted in any way, it's an exact copy of the one I use locally.

To avoid more confusion Smile here's my "works/works not"-results:

Local server with Mozilla 1.6, Firefox 0.9, Opera 7.5, IE5, IE6: Works.
Remote server with Mozilla 1.6, Firefox 0.9, Opera 7.5, IE5: Works.
Remote server with IE6: Some CSS ignored.

If anyone notices anything or has any more hints, I'd appreciate it.
Greets

[/]
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE6 ignores certain rules / Server setup?

Sorry should have read your post more carefully,
couldn't be the problem if it was working localy.
So it must point to server problem, but you probably don't need me to point that out.
Something that is confusing me is that Firefox's css editor is not loading your full style sheet, I couldt find reference to any of the images! had to click on direct link to directory to see the standard.css file .
In the div#samana input.submit there appears to be a parse error on this line
border-right: 2 (followed by lots of squares)
this does come before your dec for the bottom image! is it preventing IE from parsing the rest of the file?

Doubt if this is any help and I am probably fast getting out of my depth, so I best leave it there lest I just become irritating through lack of knowledge Smile

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

zendakk
zendakk's picture
Offline
newbie
Heidelberg, Germany
Last seen: 18 years 4 days ago
Heidelberg, Germany
Timezone: GMT+1
Joined: 2003-11-27
Posts: 7
Points: 0

IE6 ignores certain rules / Server setup?

Thanks Hugo for the validation tip! That parsing error you mentioned got me thinking. I re-downloaded the file and examined it more closely. I was wrong before: the file had actually been corrupted by the server. Specifically, it had some strange whitespace and line-break characters that I can't remember putting in originally Shock . That's where that border-bottom parsing error comes from. An innocent '2px solid #872c2c;' had turned into '2' followed by lots of space characters, a line-break and then 'px', the semicolon being devoured by some evil force.

Anyway, I've linked to the stylesheet on the "healthy" server (see source of http://www.inflagranti-music.de/bandinfo/ ) and all is well again. Which proves it's not the CSS's fault at all. I still don't understand why only IE6 choked on the corrupted sheet but at least now I know the root of the problem. A chat with the server admin tomorrow will be interesting.

Ok, so this is not really a CSS issue after all but knowing that this type of thing can happen may be useful to someone who has a similar mystery problem and is getting headaches like I did. Laughing out loud

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE6 ignores certain rules / Server setup?

Glad it's fixed, thought that had to be the problem it's the sort of result you would expect see with an parsing error, what I don't understand is why the other browsers didn't break esp IE5. Leaves my feeble mind thinking that something else was occuring as well!

still.........have fun with the admin tomorrow,
Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

zendakk
zendakk's picture
Offline
newbie
Heidelberg, Germany
Last seen: 18 years 4 days ago
Heidelberg, Germany
Timezone: GMT+1
Joined: 2003-11-27
Posts: 7
Points: 0

IE6 ignores certain rules / Server setup?

OK, update time: Problem solved.

It was a classic EOL control character problem. I could kick myself for not thinking of that before :oops:. Remember, the CSS file was written in Windows format and then handled by a Linux server. Re-saving the file in UNIX format and uploading it solved the problem. That particular server is simply more touchy than the other one.

To sum it up for those who haven't heard of this before: Unix/Linux, Mac and Windows/DOS each have a different way of signalising line breaks with control characters that are invisible. When trading files between the different OS's, this can result in problems by misinterpretiation or messing up of the data.

This has never happened to me before with html or css files but now I know it's an issue to watch out for.

Hugo wrote:
what I don't understand is why the other browsers didn't break esp IE5

Yeah, that's the weirdest thing about all this. Has to be something version-specific. Nothing surprises me about MSIE anymore :roll:

So anyone visiting the link mentioned previously in the thread, note that the old file that caused trouble has been replaced and is now read correctly by IE6 too.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 46 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE6 ignores certain rules / Server setup?

Glad you got to the bottom of it, interesting that this can happen as I would have assumed that windows/dos being essentially -at least at the outset- based on Unix would be compatible at that sort of level.
Just reminds me how much I would like to get to grips with a Linux distro and ditch windows for good.

This is one to file away for later reference.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me