Note that there are some explanatory texts on larger screens.

plurals
  1. POBoxes and Labels Not Aligned CSS
    primarykey
    data
    text
    <p>Based on this answer <a href="https://stackoverflow.com/a/3732313/461887">StackOverflow @Nikita Rybak</a> I have created a set of labels and textboxes following his solution which shows to be working on JSFiddle.</p> <p>I have copied this and added a few more categories to my ASP project but when loaded into chrome the boxes and text are all out of align.</p> <p>This is my html file</p> <pre><code>&lt;div id="User"&gt; &lt;div&gt; &lt;div class="left"&gt; &lt;asp:Label ID="lbl_UserName" runat="server" Text="User Name"&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;div class="right"&gt; &lt;asp:TextBox ID="txtbx_UserName" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;br /&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;div class="left"&gt; &lt;asp:Label ID="lbl_FirstName" runat="server" Text="First Name"&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;div class="right"&gt; &lt;asp:TextBox ID="txtbx_FirstName" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;div class="left"&gt; &lt;asp:Label ID="lbl_Password" runat="server" Text="Password"&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;div class="right"&gt; &lt;asp:TextBox ID="txtbx_Password" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;div class="left"&gt; &lt;asp:Label ID="lbl_ConfPassword" runat="server" Text="Confirm Password"&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;div class="right"&gt; &lt;asp:TextBox ID="txtbx_ConfPassword" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>and my CSS file</p> <pre><code>#Content { position: relative; float:none; border: 1px solid #000000; float: left; padding: 80px 40px 60px 40px; text-align:center; background-color: #F8F8F8; left: 0px; right: 0px; text-align: center; } #User .left { width: 30%; float: left; text-align: right;} #User .right { width: 65%; margin-left: 10px; float:left;} </code></pre> <p>Is there a reason why mine does not work?</p>
    singulars
    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