Skip to content


Ku pamięci: IE8 obejście problemu z Conditional Comments

IE8 ma taki feler, że jak się tworzy Conditional Comments w celu wybrania
odpowiedniego arkusza stylów, np:

<!–[if (!IE) | (gte IE 8)]>–>
<style type=”text/css”>
@import url(‘Stylesheet_CSSCompatible.css’);
</style>
<!–<![endif]–>

wyświetla na górze wstrętną “pozostałość” po komentarzu, tj. “–>”

IE8 i z tego co widzę tylko ta przeglądarka ma tą właściwość! Pozostałe, tj.
Chrome, IE 5.5, 6,7, 8 w trybie zgodności z 7, Opera 9.6 i Firefox 3 pomijają ten element. Aby otrzymać prawidłowy kod należy
użyć:

<!–[if (!IE) | (gte IE 8)]><!—>
<style type=”text/css”>
@import url(‘Stylesheet_CSSCompatible.css’);
</style>
<!–<![endif]–>

Działa:)

źródła:

własne doświadczenia poparte kontaktem z Jackiem S.

Posted in general, Internet Explorer, ku pamięci, tech, Techblog, Windows Client.

Tagged with , , , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.



Skip to toolbar