Previous Message
Next Message

Strange Results with IE Conditional Comments

Sent by Dejan Kozina on 1 March 2007 00:12


Hi.
Unless I misunderstood you badly, you're expecting IE to read 
IE6_default.css INSTEAD of default.css. Well, it won't.
IE will happily load any linked or included stylesheet. The CCs will 
only prevent other browsers to load the one inside the comment.
You should link the default stylesheet first, and then use the 
'commented' stylesheet only for correcting the values of the first one 
(as it comes later in the document it will overwrite the previous values).

djn


[EMAIL-REMOVED] wrote:
> This is very strange.  My CSS Conditional comments seem to work but
> when I add the link code for my default.css (non-IE CSS) into the  
> page (either before or after
> the conditional comments) IE for some reason also  parses the code in  
> default.css and it
> effects the IE layout as a result
> 
> First the environment:
> 
> :: I'm developing front-end code on Mac OS X.
> :: I'm running Windows XP on Parallels for testing.
> :: Publishing to a Windows 2003 server (I also have RDP so I can test
> there as well)
> 
> :: I'm not using multiple versions of IE or anything like that, so no
> "IE7.bat" problem or anything.
> 
> :: I'm using the following code:
> 
> <link href="/assets/css/default.css" rel="stylesheet" type="text/css"
> media="screen" />
> <!--[if IE 6]>
>      <link href="/assets/css/IE6_default.css" rel="stylesheet"
> type="text/css" media="screen" />
> <![endif]-->
> 
> Here is the URL:
> 
> http://advantix.appdev.netsolis.com/testing/index.aspx (only the
> "about us" link works right now)
> 
> Works great on Firefox Mac and Win Firefox but as you'd expect IE has
> trouble.
> 
> 1. Can anyone reproduce the same results as I get?
> 2. Do you know the reason why conditional comments are not working in
> this case?  What am I doing wrong?
> 
> Thanks so much!
> figgy 
> ______________________________________________________________________
> css-discuss [EMAIL-REMOVED]]
> http://www.css-discuss.org/mailman/listinfo/css-d
> IE7 information -- http://css-discuss.incutio.com/?page=IE7
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
> 
> 
> 
-- 
-----------------
Dejan Kozina
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225 skype: dejankozina
http://www.kozina.com/  - e-mail: [EMAIL-REMOVED]
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: