internet explorer - CSS Differences Between IE and Firefox: display -


I am developing a web application for which working with both IE 7 and Firefox 3.6 I use CSS I am laying down the tax form. The look is so beautiful I want each of these devices to stand in line with the label and option on the line (in the form of a line) on their line. Here is the CSS that works in Firefox:

  .data-group {/ * display: inline-block; * / Vertical-align: top; Padding-top: 5px; Padding-down: 5px; }. Editor-label, .option1, .option2 {display: inline-block; / * Float: left; * /}. EditorLabel {width: 250px; Vertical-alignment: top; }  

Unfortunately, it does not work in IE7. In order to achieve the same effect, I have to delete two commented lines and comment on inline-block. Editor-labels, .option1, .option2 Selection Unfortunately this Firefox breaks ... and it does not seem to be exactly the right thing to do anyway (Firefox makes a lot of sense). (I can get this method of working in Firefox if I add a "clear" dividend where I have "clear": on that div square ... but it looks like a hack.)

< P> Do I have something clear here?

Edit: Please provide the requested (trivial) HTML.

  
<%: Html.CheckBoxFor (model => model.cb1)%> <%: HTML .LabelFor (model => gt; model.label1)%> gt; & lt; / div & gt; & lt; div class = "option 1" & gt; Lt;%: Html.TextBoxFor (model = & gt; model.T2)%> gt; class = "label" & gt; & lt;%: HTML.LabelFor (model = & gt; model Label2)% & gt; & lt; / div & gt; & lt; / div & gt; & lt; div class = "verification" & gt; & lt; div & gt; & lt;%: HTML Validation message (Model = & gt; model.T2)%>
& lt ;! - Groups. - & gt; & lt; div class = "data-group" & gt; & lt; div class = "editor-label" & gt; & Lt;%: Html.CheckBoxFor (model = & gt; model.cb1)%> & Lt;%: HTML.LabelFor (model = & gt; model.label1)% & gt; & Lt; / Div & gt; & Lt; Div class = "option1" & gt; & Lt;%: Html.TextBoxFor (model = & gt; model.T2)%> & Lt; Div class = "label" & gt; & Lt;%: HTML.LabelFor (model = & gt; model.label2)%> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "verification" & gt; & Lt; Div & gt; & Lt;%: HTML Validation message (model = & gt; model. T2)%> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;

inline block does not work properly in IE ,

You Display: Inline; must be republished on block-level elements which means that inline-block is IE, which means that you have to change the rule again for the device, so that you have an inline- Block was given.

  & lt ;! - [if lt IE 8] & gt; & Lt; Style & gt; . EditorLabel {Display: Inline; Zoom: 1; } & Lt; / Style & gt; & Lt; [Endif] - & gt;  

This will solve your problem. If not, then post a demo.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -