IE 宽度渲染问题
我设计了一个固定宽度的页面,它在 Chromium、Firefox、Safari 中渲染效果相同,但在(据我所知)所有类型的 IE 中都有一个小问题。我为 IE 添加了一些条件样式,这使事情变得更好一些,但它仍然关闭(仅几个像素)。
有问题的网站在这里:http://www.brushesfacepainting.co.uk/brushes/home< /a>
IE 和 Chromium 并排渲染如下所示: http://www.brushesfacepainting.co.uk/images/renderissue.jpg
我为IE添加了条件样式来固定所有元素的宽度,在此之前,横幅样式是比身体窄很多。
我假设我遇到了 IE 错误,但我不知道是哪一个!有人可以帮忙吗?
谢谢, 李
I've designed a fixed-width page which renders equally in Chromium, Firefox, Safari, but has a small issue in (from what I can tell) ALL flavours of IE. I've added some conditional styles for IE, which make things a bit better, but it's still off (by only a couple of pixels).
The site in question is here: http://www.brushesfacepainting.co.uk/brushes/home
IE and Chromium rendering side by side is shown here: http://www.brushesfacepainting.co.uk/images/renderissue.jpg
I added conditional styles for IE to fix the width of all the elements, prior to this, the banner style was much narrower than the body.
I assume I'm hitting up against an IE bug, but I can't figure out which one! Can anyone help please?
Thanks,
Lee
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的
mainbodyie
规则的宽度与标准 css 中的宽度不同。 (851 像素与 848 像素)。修复它以匹配您的其他包装纸。另外,您的页面在 IE 中不居中 - 我建议您将整个页面包装在固定宽度包装器中,并使用 margin:0 auto 使整个页面居中 - 这样您就不会在每个布局元素的 css 中多次重复宽度。
Your
mainbodyie
rule has a width that is different than the width in your standard css. (851px vs 848px). Fix that to match your other wrappers.Also your page is not centered in IE - I suggest you wrap whole page in a fixed width wrapper with margin:0 auto to center whole page - so you don't keep repeating the width multiple times in your css for each layout element.
使用 div 结构将所有内容(如页眉、中间、页脚)包含在其中。为此 div 添加以下代码:
Use a div structure for enclosing all content like header,middle,footer inside it.Add following code for this div: