Jump to content

expression ie6, crach.


Scrum
 Share

Recommended Posts

Други проверьте у кого есть ослик 6 и иетостер. У меня почему то машина ложиться в аут.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
#wrap {
width:expression(document.body.offsetWidth < 700 ? "700px":"auto");
}
/*]]>*/
</style>
</head>

<body>
<div id="wrap">
<p>Proin eu mauris nec dui aliquam fermentum.
Praesent viverra neque a libero molestie rhoncus!
Nullam bibendum est eu turpis placerat pellentesque.
In dictum massa ut turpis tempor sit amet imperdiet diam feugiat.
Proin vitae lorem quis dolor elementum vulputate.
Aliquam nec orci enim, sed euismod urna.
Nullam a odio at neque ullamcorper lobortis nec ullamcorper dui.
</p>
</div>
</body>

</html>

Link to comment
Share on other sites

Вот это меня и удивляет, раньше работала как надо. Пробовал под виртуалкой, то же самое. может я чего не то делаю ?

Все это я протупился.

Неправильно записал.

width: expression((documentElement.clientWidth||document.body.clientWidth)<800?'800px':'100%');

Link to comment
Share on other sites

Вот эта конструкция проверенная.

width: expression(document.body.clientWidth > 700 ? "100%" : "700px");

Спасибо Влад. Тоже поделюсь. Вот для мах-width:

   width: expression( document.body.clientWidth > (800/12) * parseInt(document.body.currentStyle.fontSize) ? "43em" : "auto" );

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
Reply to this topic...

×   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