English 中文(简体)
CSS IE 和E/CN.15:显示
原标题:CSS Differences Between IE and Firefox: display

我正在开发一个网络应用程序,需要与IE7和3.6合作。 我正在介绍使用特别安全局的形式。 表格是粗略的标准。 我希望每个小区(数据组)按照自己的标签和选择,在小区(一行)内合并。 在这里,CSS在:

.data-group 
{
    /*display: inline-block;*/
    vertical-align: top;
    padding-top: 5px;
    padding-bottom: 5px;
}

.editor-label, .option1, .option2
{
    display: inline-block;
    /*float: left;*/
}

.editor-label
{
    width: 250px;
    vertical-align: top;
}

不幸的是,这在7月独立党中没有奏效。 为了发挥同样的作用,我不得不放弃两条评论线,对接听器-标签、排他性选择1、排他性2的排他性评论。 不幸的是,这种断裂......实际上,这似乎并不像正确的东西那样做任何事情(第2条的含义更为明显)。 (如果我增加一个“奇迹”四,在这个四类中,我可以这样做......但似乎就象一个黑板一样。)

我在这里找不到一些明显的东西? 帮助在两个浏览器中开展这项工作的建议是巨大的。

www.un.org/Depts/DGACM/index_spanish.htm Edit: Provide requested (trivialized) 页: 1

    <div class="data-group">
        <div class="editor-label">
            <%: Html.CheckBoxFor(model => model.cb1)%>
            <%: Html.LabelFor(model => model.label1) %>
        </div>
        <div class="option1">
            <%: Html.TextBoxFor(model => model.tb2)%>
            <div class="label"><%: Html.LabelFor(model => model.label2) %></div>
        </div>
        <div class="validation">
            <div><%: Html.ValidationMessageFor(model => model.tb2) %></div>
        </div>
    </div>

    <!-- Repeat many diff. data-groups. -->
    <div class="data-group">
        <div class="editor-label">
            <%: Html.CheckBoxFor(model => model.cb1)%>
            <%: Html.LabelFor(model => model.label1) %>
        </div>
        <div class="option1">
            <%: Html.TextBoxFor(model => model.tb2)%>
            <div class="label"><%: Html.LabelFor(model => model.label2) %></div>
        </div>
        <div class="validation">
            <div><%: Html.ValidationMessageFor(model => model.tb2) %></div>
        </div>
    </div>
最佳回答

http://work.a href=”

您必须重新申报<代码> 显示:inline; on the/2005/4 level elements that are given inline-block<>code> to IE。 你们必须重新宣布你在单独一条规则中规定停职。

<!--[if lt IE 8]>
<style>
.editor-label { display:inline; zoom:1; }
</style>
<![endif]-->

这将最有可能解决你的问题。 如果没有,请张贴备忘录。

问题回答

我使用以下所有浏览器操作的守则。

<><><><>>>

<div class="field clearfix">
    <label for="firstName" id="firstNameLabel">First Name</label>
    <input name="firstName" type="text" id="firstName" />
</div>

<>CSS

.field {
    margin: 0 0 10px;
}
.field label {
  font-size: 13px;
  padding: 8px 0;
  margin: 0 18px 0 0;
  display: block;
  float: left;
  width: 90px;
}
.field input,
.field textarea {
  width: 220px;
  font-size: 11px;
  line-height: 11px;
  padding: 6px 10px;
  color: #666;
  background: #fff;
  border: 1px solid #c4c6c7;
  display: block;
  float: left;
}

www.un.org/Depts/DGACM/index_spanish.htm 而且,所有非常著名的固定舱(预示着你必须增加清理内容)。 仅就包含浮构元素的母体编织物,它像一种药。

.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    font-size:0;
    clear: both;
    visibility:hidden;
}
   .clearfix{display: inline-block;}
  * html .clearfix {height: 1%;}
  .clearfix {display:block;}

如果你不希望填满现有的全部空间,你就可以绕过大街,以取得你的效果。

Good luck.

截至撰写本报告时,你的问题没有(x)html样本,因此,我只能向您提供解决您问题的方法,而不是具体的解决办法,但可以很容易地调整这些方法。

您举出两种明显的办法,针对不同的浏览器(尽管它利用了EE有条件的评论,从而基本上把IE和非IE作为目标,而后者可能与你的需要一样有用),要么使用有条件的评论进口专门针对互联网探索者的风格:

<head>
    <link rel="stylesheet" type="text/css" href="path/to/general/stylesheet.css" />

    <!--[if ie]>
        <link rel="stylesheet" type="text/css href="path/to/ie/stylesheet.css" />
    <![endif]-->
</head>

这种做法的倒数是,你要维持两种不同的风格。

或者,你可以使用有条件的评论来改变挑选者的特殊性:

<body>
    <!--[if ie]>
        <div id="ieOnly">
    <![endif]-->

    <div id="somethingToStyle">
        ...content...
    </div>

    <!--[if ie]>
        </div>
    <![endif]-->
</body>

这种做法使你的目标不同于对适当的浏览器,而没有在我们的中心使用 ha:

body > div#somethingToStyle { /* for non-IE */ }

body > div#ieOnly > div#somethingToStyle { /* IE only */}

这种方法的倒数部分是,你用一种风格检查所有风格,这样就可以维持长期。

此外,值得提及的是,使用CSS的复式风格和一种有效的理论,可能会减少major浏览器差异的影响(显然并非全部)。





相关问题
Image rendered with wrong colors in IE8

I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...

Determine Mobile Internet Explorer version

I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...

CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

Internet Explorer only part loading JavaScript/CSS

I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...

IE doesn t run Javascript when you click back button

I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...