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 7941991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:50:01+00:00 2026-06-03T23:50:01+00:00

I been messing around with the css but i cannot get the layout I

  • 0

I been messing around with the css but i cannot get the layout I want..
I want to make all the input fields vertically aligned but its important that i still keep the dividers (since i use javascript on them)
I been playing around with different positions and float settings and i cannot seem to get it to work…

If somebody has a nice solution that will make it all vertically align (with labels directly on top of the input fields) I would really appreciate it

here is my messy code:

http://jsfiddle.net/hYa9a/4/

  • 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-03T23:50:02+00:00Added an answer on June 3, 2026 at 11:50 pm

    An alternative to Nightfirecat’s suggestion, if the plan is to get the labels above the text box, then this might do the trick:

    BTW: I think there’s a typo in the jsfiddle.net/hYa9a/4/ code. In the password field one of the IDs is entered as usernameIn. Was this supposed to be passwordIn?

    <style>
    #optionsBar{ /*same as login*/}
    .placeholder {
        background-color: #fff;
        outline: none;
        font-family: "Times New Roman", Times, serif;
        font-size: 12px;
        text-indent: 0;
        /*box-shadow: 0 1px 1px rgba(0, 0, 0, 0.07) inset, 0 0 8px rgba(82, 168, 236, 0.6); */
        -moz-border-radius: 2px;
        border-radius: 2px;
    }
    /*same as login*/
    .selectInput {
        border: 1px solid #8BAAFE;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.07) inset, 0 0 5px rgba(33, 93, 253, 0.6);
    }    
    
    #smLogin{
    position:relative;
    float:right;
    width:100%;
    height:30px;
    }
    
    #usernameIn{
        position: relative;
        float: left;
        width:150px;
        margin-left:-150px;
        margin-top:20px;
    }
    #passwordIn{
        position: relative;
        float: left;
        width:150px;
        margin-left:-150px;
        margin-top:20px;
    }
    #username{
        width:150px;
        position: relative;
        float: left;
    }
    #password{
        position: relative;
        float: left;
        width:150px;
    }
    #firstInput{
        position: relative;
        float: left;
    }
    #secondInput{
    position: relative;
        float: left;
    }
    ​</style>
    
    <div id="optionsBar">
    <div id="smLogin">
    <form name="smLoginForm">
    
    <div id="username" >
    <label id="usernameLb"  for="username">Username</label>
    </div>
    <div id="usernameIn" class="inputs">
     <input id="firstInput" name="username"  class="placeholder controlInput"   type="text" size="20" value="">
    </div>
    
    <div id="password" >
     <label id="passwordLb" for="password">Password</label>
    </div>
    <div id="passwordIn" class="inputs">
     <input id="secondInput" name="password" class="placeholder controlInput" type="password" size="20" value="">
    </div>
    
    </form>
    </div>
    </div>​
    

    NB: If there was an option to modify the HTML code and not just the CSS, I would have suggested placing your form label and text box in a wrapper div. Something like:

    <div class="formobject">
    <div id="username" >
    <label id="usernameLb"  for="username">Username</label>
    </div>
    <div id="usernameIn" class="inputs">
     <input id="firstInput" name="username"  class="placeholder controlInput"   type="text" size="20" value="">
    </div>
    </div>
    

    Then you could clean up the CSS by removing all the styles on the individual labels and text boxes and set the width and floating to only the formobject div instead. Like:

    <style>
    .formobject{
        float: left;
        width:150px;
    }
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been messing around with my meta descriptions, trying to make them more
I've been messing around with this for a while now, but I can't seem
I've been messing around with jQuery plugin code and I'm trying to put all
I've just been messing around with threads in Java to get my head around
Yeah so I've been messing around with javascript a while but only recently got
i've been messing around trying figure this out myself but its taking a while..
I've been messing around all day trying to find why my query performance is
I have been messing around with GWT uploads lately. I want to have the
I have been messing around with recursion a few hours and just cant get
I've recently been messing around with jquery(ui) and now I want to add some

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.