css - IE9 中的 "margin-left"

标签 css absolute

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

.rightBann{
    float:right;
    width:188px;
    height:254px;
    border:1px solid #ddd;
    border-left:0 none;
    border-top:1px solid #ddd;
}

<div class="rightBann" style="position:absolute; background-color:#ffffff; margin-left:110px;">
    Object
</div>

它在 Crome 浏览器上看起来很完美。但是在 IE9 中,Object 的左侧还有另外 110px 的空间。(从左边开始总共 220px) 这个 CSS 是怎么回事?

最佳答案

这是你想要的吗?我使用了 padding-left

http://jsfiddle.net/ZQMew/

关于css - IE9 中的 "margin-left",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9950922/

相关文章:

CSS:Div 跨越 2 个其他 div

css - "dropdown-toggle"默认关闭

css - ie7中绝对位置问题,div向右移动10px

css - 无法启动我的@media 代码,你明白为什么了吗?

html - 互联网浏览器 : relatively positioned button alignment in absolutely positioned box

css - 使用内联或作用域 CSS 恢复默认的 Firefox <select> 样式

javascript - 如何找到 body 元素之后的每个子元素,并获取其中包含特定类的元素的 html

css - 当位置是绝对时,相对于表格单元格定位元素的顶部

html - 如何在 CSS 中选择这一特定行?

html - 当我调整窗口大小时,我们如何防止图像使用 HTML-CSS 移动?