IE中的CSS/HTML问题 - 如何解决?
-
01-10-2019 - |
题
我在这里在此页面上工作:
在Firefox,Chrome,Opera和IE8中看起来不错
但是,当我在IE8中打开“兼容性视图”时,菜单图像位于文本下方。
仅在此视图中发生的另一个问题是在此页面中:
http://noasimon.co.il/exhibition2010
缩略图在视图外的左边太远。
有人知道如何解决这个问题?我对这种东西几乎没有经验。
解决方案
.ngg-album { position: relative; } .ngg-albumimage img { position: absolute; left: 0; top: 0; } .ngg-albumimage { display: inline; }
其他提示
恭喜W3C-VALID HTML! (我检查只是为了确保)
因为看起来像 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;
}
在您的页面上的第二个看,我认为我的朋友使用的一个技巧可能会有所帮助:
* {填充:0;保证金:0;}
这通常有助于解决与保证金和填充默认值相关的常见IE兼容性问题。
看来这是一个很好的情况 “双边距”
基本上您需要做的“兼容视图”是设置 display
到 inline
在漂浮并具有余量的元素上。
.ngg-albumtitle {
float: right;
display: inline;
}
你可以用过..
。填充:0px;
} .sidebar li {float:right;显示:内联块;保证金:1px;填充:0px 4px'
字体大小:..;
}
谢谢Ptiwari。
不隶属于 StackOverflow