我的 html 中有这个标签:
<img border="0" src="images\Close.gif" alt="بستن" onclick="hideSearchPopUp(id);"/>
在大多数已知浏览器中没有问题,但在 Internet Explorer 父浏览器中 <div>
标签变形。
喜欢这张照片:
正如你在这里看到的,父级 div 的高度增加了,关闭按钮移到了左下角
最佳答案
看来是IE的bug! 我为 parent 设置了高度,但在我设置宽度之前它不起作用! 设置 width height 后实现,正如我设置的那样。
<div id="banner_div" style="overflow: auto; height: 16px; width: 120px;">
<strong style=" float:right;">
جستجو
</strong>
<img border="0" src="images\Cancel.gif" alt="بستن" onclick="hideSearchPopUp('to1');" align="left">
<img border="0" src="images\loading.gif" alt="در حال جستجو" style="display:none; " align="left" name="loading">
</div>
关于html - 为 Internet Explorer 左对齐 img 标签,使父 div 变形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15221500/