Jump to content
  • 0

IE-хак не работает


7ion
 Share

Question

Есть такой код:

#leftnav a {
border-bottom: expression(this.nextSibling == null ? "1px solid #cccccc" : "none");
}

Сие костыль для работы :last-child.

this.nextSibling действительно null, если </a></div>, т.е. нет пробелов.

Но вот в ie8 это не работает. null nullом, но работать не хочет.

CSS подключается верно:

<!--[if lte IE 8]>
<link href="etc/ie.css" rel="stylesheet" type="text/css">
<![endif]-->

В чем проблема? Ведь работает даже в ИЕ 5.5 :)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

В чем проблема? Ведь работает даже в ИЕ 5.5 :)

В ИЕ8 в стандартном режиме ИЕ8 экспрешаны не работают:

Support for "CSS Expressions," or Dynamic Properties, has ended for Internet Explorer 8 in IE8 mode (or EmulateIE8 mode with an Internet Explorer 8 !DOCTYPE directive) for standards-compliance and performance reasons. However, they will still function as expected in Internet Explorer 8 on pages in IE7 Standards mode, EmulateIE7 mode, or IE5 (Quirks) mode. For more information on document compatibility modes, see Defining Document Compatibility.

http://msdn.microsoft.com/en-us/library/cc304082(VS.85).aspx#expressions

Link to comment
Share on other sites

  • 0

И что же тогда делать?

На выбор:

1. Найти другое решение задачи.

2. Забить.

3. Использовать обычный скрипт.

4. Переключить режим ИЕ используя другой доктайп, или не используя вообще.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy