IE CSS Bug - How do I maintain a position:absolute when dynamic javascript content on the page changes

后端 未结 3 889
野趣味
野趣味 2021-01-15 03:23

I have a page where there is a column and a content div, somewhat like this:

blahblahblah
3条回答
  •  深忆病人
    2021-01-15 03:47

    Its a bug in the rendering engine. I run into it all the time. One potential way to solve it is to hide and show the div whenever you change the content (that in turn changes the height):

    var divCol = document.getElementById('column');
    divCol.style.display = 'none';
    divCol.style.display = 'block';
    

    Hopefully this happens fast enough that it isn't noticeable :)

提交回复
热议问题