Internet Explorer - <img> width not taking effect?

半腔热情 提交于 2019-12-11 03:28:07

问题


I have an issue in IE9 with IMG width, it can be seen here, http://ncms.us/ncms/admin/login the only issue I see is that I'm using ' instead of " for my tags because its within a PHP echo. The main picture up at the header is huge on IE (IE9+IE10 tested.) looks fine in everything but IE. Here is the code that is throwing IE off. I can see why, its very complex and nothing its seen before (-_- lol)

<img style='margin-top: -25px;' src='img/ncms_logo.png' width='300' height='250' />

Yay for IE!


回答1:


It looks like in your bootstrap.min.css there is a default class from img. that has the property width:auto;

If this is removed it will display properly in IE.

Additionally just adding

 width: 300px;

in your style along with the margin, will correct the issue.



来源:https://stackoverflow.com/questions/13694837/internet-explorer-img-width-not-taking-effect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!