Reputation: 308
I got the following code and im using twitter bootstrap.
<div class="span10">
<div class="span2">@Html.Label("lblUsername", "Username : ")</div>
<div class="span7">
@Html.TextBoxFor(x => x.Username)
</div>
@Html.ValidationMessageFor(x => x.Username)
</div>
<div class="span10">
<div class="span2">@Html.Label("lblPassword", "Password : ")</div>
<div class="span7">
@Html.PasswordFor(x => x.Password)
</div>
</div>
<div class="span10">
<div class="span2">@Html.Label("lblName", "Name : ")</div>
<div class="span7">
@Html.TextBoxFor(x => x.Name)
</div>
</div>
<br />
<div class="span10"><input type="submit" value="Submit" /></div>
The way it displayed in chrome and IE is different, can anyone tell me why? You can check the image below,somehow the div for the textbox goes down to the next line in IE 9.
Upvotes: 1
Views: 1990
Reputation: 228162
I guessed this..
Is IE in Quirks Mode? Press F12 to bring up the Developer Tools to check.
..due to the way the elements were displaying; it looked like Quirks Mode to me.
In your case, the problem was that you didn't have a valid doctype (such as <!DOCTYPE html>
) as the first line.
Upvotes: 5