IE 单选按钮对齐问题
我有一个基本完成的 ASP.Net-MVC 应用程序。但是,我有一个页面包含单选按钮。当该页面在 Firefox 或 Chrome 中显示时,单选按钮显示在水平行中(这就是我想要的)。但是当页面在 IE 中加载时,单选按钮会显示在列中。我正在使用 Html.RadioButton 帮助器。
我尝试编辑主样式表中的几个 css 属性,但无法找到解决方案。
你们中有人以前遇到过这种情况吗?如果是这样,解决方案是什么?
I have an ASP.Net-MVC application that is mostly complete. However, I have one page that contains radio buttons. When that page is displayed in Firefox or Chrome, the radio buttons are displayed in a horizontal row (which is what I want). But when the page loads in IE, the radio buttons show up in a column. I am using the Html.RadioButton helper.
I have tried editing several of the css properties in the master stylesheet, but I have not been able to come up with a solution.
Have any of you encountered this before? If so, what could the solution be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果你能列出你尝试过的内容,那会很方便@Jacob。
你试过css显示:内联吗?
或者您是否尝试过将它们作为
放在
中,然后在 ul 或 li 上设置 display:inline ?
It would be handy @Jacob, if you could list what you have tried.
Have you tried the css display:inline?
Or have you tried putting them as
<li>
's in a<ul>
and then setting the display:inline on the ul or the li's?我最终只是将单选按钮放在表格行中。这不是最优雅的解决方案,但它始终有效。
I ended up just putting the radio buttons in a table row. It's not the most elegant solution, but it works all the time.