Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8895831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:53:19+00:00 2026-06-14T23:53:19+00:00

Based on this answer StackOverflow @Nikita Rybak I have created a set of labels

  • 0

Based on this answer StackOverflow @Nikita Rybak I have created a set of labels and textboxes following his solution which shows to be working on JSFiddle.

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.

This is my html file

<div id="User">
<div>
<div class="left">
    <asp:Label ID="lbl_UserName" runat="server" Text="User Name"></asp:Label>
</div>
<div class="right">
    <asp:TextBox ID="txtbx_UserName" runat="server"></asp:TextBox>
    <br />
</div>
</div>

<div>
<div class="left">
    <asp:Label ID="lbl_FirstName" runat="server" Text="First Name"></asp:Label>
</div>
<div class="right">
    <asp:TextBox ID="txtbx_FirstName" runat="server"></asp:TextBox>
</div>
</div>

<div>
<div class="left">
    <asp:Label ID="lbl_Password" runat="server" Text="Password"></asp:Label>
</div>
<div class="right">
    <asp:TextBox ID="txtbx_Password" runat="server"></asp:TextBox>
</div>
</div>

<div>
<div class="left">
    <asp:Label ID="lbl_ConfPassword" runat="server" Text="Confirm Password"></asp:Label>
</div>
<div class="right">
    <asp:TextBox ID="txtbx_ConfPassword" runat="server"></asp:TextBox>
</div>
</div>
</div>

and my CSS file

#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;}

Is there a reason why mine does not work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:53:20+00:00Added an answer on June 14, 2026 at 11:53 pm

    It should work okay, though you have a few too many divs in there unnecessarily, and you also have a line break that may be screwing things up. Check out this fiddle

    HTML

    <div id="User">
        <div class="left">
            <label>User name</label>
        </div>
        <div class="right">
            <input type="text" />
        </div>
        <div class="left">
            <label>First name</label>
        </div>
        <div class="right">
            <input type="text" />
        </div>
        <div class="left">
            <label>Password</label>
        </div>
        <div class="right">
            <input type="text" />
        </div>
        <div class="left">
            <label>Confirm password</label>
        </div>
        <div class="right">
            <input type="text" />
        </div>
    </div>​​​​​​​​​​​​
    

    CSS

    #User .left {
        width: 30%;
        float: left;
        text-align: right;}
    
    #User .right {
        width: 65%;
        margin-left: 10px;
        float:left;}​
    

    Also, you have a #Content element defined in your CSS nut it is not in the HTML, so that could be causing the problem.

    EDIT
    The only other thing I can think of is that the label control wraps the text in a – maybe try a literal control? The fiddle works fine, so it must be something with webforms controls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Based on the answer I received on this question ( https://stackoverflow.com/questions/1911969/... ) I have
This question is based on my previous question which I got a working answer
Based on this question I've created a small application which is catching all debug
I just showing the spinner with multiple choice based on this stackoverflow answer(see @Destil
This question is based on an answer I received for another question : https://stackoverflow.com/a/3060233/323357
I have used Jim McCurdy's very helpful answer to this StackOverflow question to avoid
This is a further question based on this answer: How can I implement a
Based on the answer for this question What's the difference between CompositionBatch and catalogs?
Based the accepted answer to this question I've setup a NetBeans/tomcat environment. In testing
UPDATE: Solved. Thanks BusyMark! EDIT: This is revised based on the answer below from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.