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.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
riki
Скрипт который уравнивает высоты элементов div в зависимости от содержания в них текста
Работает в FF и Opera, но IE не работает, хотя алерты выводят новые (изменившиеся) высоты дивов.
IE не перерисовывает дивы ?
window.onload = function () {
var sr = document.getElementById('sr').clientHeight;
var tex = document.getElementById('tex').clientHeight;
//для контроля
alert('texdiv.style.height='+document.getElementById('tex').clientHeight)
if(sr<965&&text<965)return;
if(sr>tex){
document.getElementById('tex').style.height = (sr-20)+'px';
//для контроля
alert('tex.style.height='+document.getElementById('tex').clientHeight);
}
else if(sr<tex){
document.getElementById('sr').style.height = (tex-20)+'px';
//для контроля
alert('sr_height='+document.getElementById('sr).clientHeight);
}
}
В чем ошибка?
Edited by rikiLink to comment
Share on other sites
9 answers to this question
Recommended Posts
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.