IE 中的 CSS/HTML 问题 - 如何修复?

发布于 2024-09-07 23:10:58 字数 397 浏览 2 评论 0原文

我正在此页面上工作:

http://noasimon.co.il/

它看起来不错Firefox、Chrome、Opera 和 IE8
但是当我在 IE8 中打开“兼容性视图”时,菜单图像位于文本下方。

仅在此视图中发生的另一个问题位于此页面中:
http://noasimon.co.il/exhibition2010

缩略图在视图之外太靠左。

有人知道我该如何解决这个问题吗?我对这类事情的经验很少。

I'm working on this page here:

http://noasimon.co.il/

It looks fine in firefox, chrome, opera and IE8
But when I turn on the "compatibility view" in IE8, the menu images go below the text.

Another problem which happens only in this view is in this page:
http://noasimon.co.il/exhibition2010

The thumbnails go too far left outside the view.

Anyone know how can I fix this? I have very little experience with this sort of stuff.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

这样的小城市 2024-09-14 23:10:58
.ngg-album {
    position: relative;
}
.ngg-albumimage 
img {
    position: absolute;
    left: 0;
    top: 0;
}
.ngg-albumimage {
    display: inline;
}
.ngg-album {
    position: relative;
}
.ngg-albumimage 
img {
    position: absolute;
    left: 0;
    top: 0;
}
.ngg-albumimage {
    display: inline;
}
春庭雪 2024-09-14 23:10:58

恭喜 HTML 获得 W3C 有效! (我检查只是为了确保)

因为看起来 div#header 总是 50px 高,并且始终位于 内部的 (0,0) >div#wrapper,并且 div.sidebar 始终位于 (0,50),为什么不这样做:

div#wrapper {
    position: relative;
}

div#wrapper div#header {
    position: absolute;
    height: 50px;
    top: 0px;
    left: 0px;
}

div#wrapper div.sidebar {
    position: absolute:
    top: 50px;
    left: 0px;
}

Congratulations on the W3C-valid HTML! (I checked just to make sure)

Since it looks like the div#header is always going to be 50px tall and always at (0,0) inside of the div#wrapper, and the div.sidebar always at (0,50), why not do this:

div#wrapper {
    position: relative;
}

div#wrapper div#header {
    position: absolute;
    height: 50px;
    top: 0px;
    left: 0px;
}

div#wrapper div.sidebar {
    position: absolute:
    top: 50px;
    left: 0px;
}
往事随风而去 2024-09-14 23:10:58

在第二次查看您的页面时,我认为我的朋友使用的一个技巧可能会有所帮助:

* {填充:0;边距:0;}

这通常有助于解决与 margin 和 padding 的默认值相关的常见 IE 兼容性问题。

On a second look on your page I thought a trick a friend of mine uses might be of help:

* {padding: 0; margin: 0;}

This usually helps solving common IE compatibility issues connected with the default values of margin and padding there.

今天小雨转甜 2024-09-14 23:10:58

看起来这是 "double margin" 的一个很好的

例子对于“兼容视图”,需要做的是将浮动且有边距的元素上的 display 设置为 inline

.ngg-albumtitle {
    float: right;
    display: inline;
}

It looks like this is a good case of "double margin"

Basically what you need to do for "compatible view" is to set display to inline on elements that are floated and have margin.

.ngg-albumtitle {
    float: right;
    display: inline;
}
染火枫林 2024-09-14 23:10:58

你可以使用..

.sidebar ul {
边距:0px;
内边距:0px;

}
.侧边栏李{
浮动:右;
显示:内联块;
边距:1px;
填充:0px 4px'

字体大小:...;

}

谢谢
普蒂瓦里。

you can used..

.sidebar ul {
margin:0px;
padding:0px;

}
.sidebar li {
float: right;
display: inline-block;
margin:1px;
padding:0px 4px'

font-size:..;

}

Thanks
Ptiwari.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文