html - CSS跨浏览器图像对齐问题

标签 html internet-explorer css cross-browser

我正在肯大学网站上工作,遇到跨浏览器问题。

在 IE 8 中显示不正确。 但在 firefox 和 chrome 中它工作正常。

这是我正在尝试修复的带有文本框的图像..

这是演示页面。 http://safijustonline.com/Forms/Student/StudentRegistration.aspx

请在 IE 和 firefox 中检查..

如何解决这个跨浏览器的图像对齐问题?

登录信息:

用户名 = alinisar@ken.com 通过=123


更新:

我还在我的主题中添加了 reset.css 文件。

我的代码生成的 HTML:

<div id="CPH_Content_TabContainerStudentRegistration_TabPanelMain_Cmb_Shift" class="WindowsStyle" style="display:inline-block;">
<table id="CPH_Content_TabContainerStudentRegistration_TabPanelMain_Cmb_Shift_Cmb_Shift_Table" class="ajax__combobox_inputcontainer" cellspacing="0" cellpadding="0" style="border-width:0px;border-style:None;border-collapse:collapse;display:inline-block;position:relative;top:5px;">
<tbody>
<tr>
<td class="ajax__combobox_textboxcontainer">
<td class="ajax__combobox_buttoncontainer">
<button id="CPH_Content_TabContainerStudentRegistration_TabPanelMain_Cmb_Shift_Cmb_Shift_Button" type="button" style="height: 25px; width: 25px; margin: 0px; padding: 0px; visibility: visible;"></button>
</td>
</tr>
</tbody>
</table>
<ul id="CPH_Content_TabContainerStudentRegistration_TabPanelMain_Cmb_Shift_Cmb_Shift_OptionList" class="ajax__combobox_itemlist" style="display: none; visibility: hidden; z-index: 10000; overflow: hidden; width: 215px; position: absolute; height: 30px;">
<li>Morning</li>
<li>Evening</li>
</ul>
<input id="CPH_Content_TabContainerStudentRegistration_TabPanelMain_Cmb_Shift_Cmb_Shift_HiddenField" type="hidden" value="0" name="ctl00$CPH_Content$TabContainerStudentRegistration$TabPanelMain$Cmb_Shift$Cmb_Shift_HiddenField">
</div>

我的按钮和图像的 css:

.WindowsStyle .ajax__combobox_inputcontainer .ajax__combobox_buttoncontainer button {
    background-image: url("Images/windows-arrow.gif");
    background-position: left top;
    border: 0 none;
    height: 22px;
    margin: -10px 0 0;
    padding: 0;
    width: 22px;
}

按钮顶部的图像。 enter image description here

最佳答案

添加这个试试

    .ajax__combobox_textboxcontainer{
    vertical-align:top;
}

我在 IE8 中测试过。有效

DEMO

关于html - CSS跨浏览器图像对齐问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15018024/

相关文章:

html - Css 背景图片根本不显示

html - 行列之间的网格间距不一致

html - Visual Studio 调试错误“错误处理启动 : Error: Could not attach to main target

javascript - CSS 和 Javascript 可在内部服务器上运行,但不能在外部服务器上运行

javascript - 完整的 IE 失败 - jquery

scaleY 上的 jQuery 动画从 100 到 0 只需设置值

javascript - 如果在表格网格中选中复选框,则禁用文本框

html - 图像和文本并排在 div 中,想在调整大小时缩小图像

html - Internet Explorer 中的表格填充

html - 让非固定宽度的 div 完美适合父级而不会溢出?