相关疑难解决方法(0)

如何使用CSS摆脱元素的偏移量?

我有一些元素的定位问题,在检查IE8开发人员工具时它向我显示:

偏移来自哪里?

现在我很确定我的问题是12偏移,但我该如何删除它?我找不到任何CSS偏移属性.除保证金外,我们还需要抵消吗?

这是产生这个的代码:

 <div id="wahoo" style="border: solid 1px black; height:100px;">

    <asp:TextBox ID="inputBox" runat="server" />

    <input id="btnDropDown" type="button" style="width:26px; height:26px; background-position: center center; border-left-color: buttonface; background-image: url(Images/WebResource.gif); border-bottom-color: buttonface; border-top-color: buttonface; background-repeat: no-repeat; border-right-color: buttonface;"  tabindex="99" />

    <div id="ListboxWrapper" style="display:none; position:absolute; onfocusout="this.style.display = 'none'"">
       <asp:ListBox ID="lstBoxCompany" runat="server" AutoPostBack="True" OnSelectedIndexChanged="lstBoxCompany_SelectedIndexChanged" style="z-index: 100;" Width="300px" />               
    </div>

</div>
Run Code Online (Sandbox Code Playgroud)

具有偏移的元素是 inputBox

html css user-interface internet-explorer

88
推荐指数
3
解决办法
10万
查看次数

标签 统计

css ×1

html ×1

internet-explorer ×1

user-interface ×1