Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS Form Layout funny
    primarykey
    data
    text
    <p>I have a weird problem. I have a ASP.Net MVC 3 site, containing a user registration page with the following markup:</p> <pre><code>&lt;div&gt; &lt;fieldset&gt; &lt;legend&gt;Personal Information&lt;/legend&gt; &lt;div class="editor-label"&gt; First Name &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("Firstname") &lt;/div&gt; &lt;div class="editor-label"&gt; Last Name &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("Lastname") &lt;/div&gt; &lt;div class="editor-label"&gt; Employee Number &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("EmployeeNo") &lt;/div&gt; &lt;div class="editor-label"&gt; Id Number &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("Idnumber") &lt;/div&gt; &lt;div class="editor-label"&gt; Date of birth &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("Dob") &lt;/div&gt; &lt;div class="editor-label"&gt; Cell Number &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("CellNumber") &lt;/div&gt; &lt;/fieldset&gt; &lt;fieldset&gt; &lt;legend&gt;Site Preferences&lt;/legend&gt; &lt;div class="editor-label"&gt; Username &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("Username") &lt;/div&gt; &lt;div class="editor-label"&gt; Password &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.Password("Password") &lt;/div&gt; &lt;div class="editor-label"&gt; Confirm Password &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.Password("Confirm") &lt;/div&gt; &lt;div class="editor-label"&gt; E-mail &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.TextBox("Email") &lt;/div&gt; &lt;p&gt; &lt;input type="submit" value="Register" /&gt; &lt;/p&gt; &lt;/fieldset&gt; &lt;/div&gt; </code></pre> <p>Everything looks fine and their alignment is 100% except for the Id Number and E-mail text inputs which looks like its right aligned. The css is use looks like:</p> <pre><code> form { margin: 0; padding: 0; } fieldset { margin: 1em 0; border: none; border-top: 1px solid #ccc; } legend { margin: 1em 0; padding: 0 .5em; color: #036; background: transparent; font-size: 1.3em; font-weight: bold; } label, .editor-label { float: left; width: 100px; padding: 0 1em; text-align: right; } fieldset div { margin-bottom: .5em; padding: 0; display: block; } fieldset div input, fieldset div textarea { width: 150px; border-top: 1px solid #555; border-left: 1px solid #555; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 1px; color: #333; } fieldset div select { padding: 1px; } div.fm-multi div { margin: 5px 0; } div.fm-multi input { width: 1em; } div.fm-multi label { display: block; width: 200px; padding-left: 5em; text-align: left; } #fm-submit { clear: both; padding-top: 1em; text-align: center; } #fm-submit input { border: 1px solid #333; padding: 2px 1em; background: #555; color: #fff; font-size: 100%; } input:focus, textarea:focus { background: #efefef; color: #000; } fieldset div.fm-req { font-weight: bold; } fieldset div.fm-req label:before { content: "* "; } #container { margin: 0 auto; padding: 1em; width: 350px; text-align: left; } p#fm-intro { margin: 0; } </code></pre> <p>What am I missing, why is it just the two fields thats all wrong?</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload