css - ASP :DropDownList vertical text alignment in Mozilla

标签 css firefox alignment

我使用 ASP:DropDownList 控件在 ASP.net 页面上选择了文本框和下拉列表。

它们在 chrome、IE、opera、safari 中都显示良好,但在 FF 中我得到:

enter image description here

注意“请选择”在下拉列表中位于顶部。

代码:

<asp:DropDownList runat="server" onclick="changeBorderColor(this.id)" forecolor="White"  style="border:none; Width:352px; font-size:15px; font-family:Arial, helvetica, Verdana; height:35px; color: rgb(0, 0, 0); border: 1px solid rgb(124, 201, 25); border-radius:4px 4px 4px 4px; box-shadow:0px 0px 9px rgb(191, 191, 191) inset; padding-left:10px; " ID="Country" Width="282px" >

我试过设置一些“padding-top:”,但它会导致其他问题。

如何让文本显示在控件的垂直中心?

最佳答案

而不是 vertical-align 使用 line-height 30 或其他。尝试 20 到 30 之间的东西

关于css - ASP :DropDownList vertical text alignment in Mozilla,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14281603/

相关文章:

javascript - 如何在 AJAX 调用中捕获 sec_error_unknown_issuer 错误?

css - Firefox:Div 元素上的背景图像过渡不起作用

html - 我需要将图像放在画廊的中心,但没有任何效果

html - 在较大的文本 block 旁边定位文本行时出现问题

css - 使用客户端包中定义的图像作为背景图像

html - 如何将默认 CSS 样式应用于所有 HTML 页面

css - @media (color) 失败的颜色

css - Web 字体 (WOFF) 仅在禁用 ClearType 的 Firefox v32.0(当前)中模糊

html - 垂直对齐因图像而困惑

html - 无法在子列表中删除直通线