Skip to content

Instantly share code, notes, and snippets.

@h4
Created February 29, 2012 22:58
Show Gist options
  • Save h4/1945186 to your computer and use it in GitHub Desktop.
Save h4/1945186 to your computer and use it in GitHub Desktop.
Эмуляция свойств
/*
Минимальная и максимальная ширина в IE6
*/
.block {
min-width: 400px;
max-width: 800px;
width:expression(document.body.clientWidth > 800? "800px" : (document.body.clientWidth < 400 ? "400px" : "100%"));
}
<!--[if lte IE 6]>
<script type="text/javascript">
window.attachEvent("onload", mmwidth);
window.attachEvent("onresize", mmwidth);
function mmwidth() {
document.getElementById("wrap").style.width = (document.body.clientWidth < 400 ? "400px" : (document.body.clientWidth > 800 ? "800px" : "100%"))
};
</script>
<![endif]-->
/*
Эмуляция :before и :after в IE6 и IE7
*/
dt{
//z-index: expression(runtimeStyle.zIndex = 1, insertAdjacentHTML('afterBegin', 'Вопрос: '));
}
dd{
//z-index: expression(runtimeStyle.zIndex = 1, insertAdjacentHTML('afterBegin', 'Ответ: '));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment