Internet Explorer - < img>宽度没有生效? [英] Internet Explorer - <img> width not taking effect?

查看:153
本文介绍了Internet Explorer - < img>宽度没有生效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IE9中有IMG宽度的问题,可以在这里看到, http:// ncms。 us / ncms / admin / login 我看到的唯一问题是我使用'而不是'代替我的标签因为它在PHP回声中。标题上的主要图片在IE上很大(IE9 + IE10经过测试。)除了IE之外的所有内容看起来都很好。以下是关闭IE的代码。我可以看到为什么,它非常复杂而且之前没有看到它(-_- lol)

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' />

支持IE浏览器!

推荐答案

看起来你的bootstrap.min.css中有一个来自img的默认类,其属性宽度为:auto;

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

如果这被删除它将在IE中正确显示。

If this is removed it will display properly in IE.

另外只需添加

 width: 300px;

i你的风格和保证金将纠正问题。

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

这篇关于Internet Explorer - &lt; img&gt;宽度没有生效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆