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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:40:55+00:00 2026-05-25T14:40:55+00:00

All, I have the following code: http://jsfiddle.net/k2AMG/7/ I am trying to avoid fixed widths

  • 0

All,

I have the following code:

http://jsfiddle.net/k2AMG/7/

I am trying to avoid fixed widths in the CSS and align the divs in this fashion, but am not able to do so:

Your name    Textbox
             Please check the name
Work email   Textbox 
             Email should have a valid format
Job title    Textbox
             Job title should have only alphabets

Any help is appreciated. Thanks

  • 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-05-25T14:40:56+00:00Added an answer on May 25, 2026 at 2:40 pm

    Try it like this:

    http://jsfiddle.net/andresilich/k2AMG/11/

    ::Edit:: fixed demo

    ::Edit 2:: added CSS and HTML to post for future reference

    CSS

    .data_item{
       margin-bottom: 20px;
       display: block;
    }
    
    label
    {
        width: 100px;
        display:inline-block;
    }
    
    .left {
        display:inline-block;
        margin-right:5px;
    }
    
    .right {
        display:inline-block;
        vertical-align:top;
    }
    
    .right span span {
        display:list-item;
        list-style-type:none;
    }
    

    Clarification: created two classes to separate the two sides, .left and .right, and added a style to the span of the .instructions div to display as a list-item (so they can displace like a regular html list would, why? Because it is a clean, responsive drop that displaces naturally without the need to add margin or padding that might displace with any other element around and thus less maintenance.).

    HTML

    <div class="data_item">
        <div class="left">
            <label> Your name </label>
        </div>
        <div class="right">
            <span>
               <input type="text" />
               <span class="instructions">Please check the name</span>
            </span>
        </div>
    </div>
    
    <div class="data_item">
        <div class="left">
            <label> Work email </label>
        </div>
        <div class="right">
            <span class="item">
               <input type="text" />
               <span class="instructions">Email should have a valid format</span>
            </span>
        </div>
    </div>
    
    <div class="data_item">
        <div class="left">
            <label> Job title </label>
        </div>
        <div class="right">
            <span class="item">
               <input type="text" />
               <span class="instructions">Job title should have only alphabets</span>
            </span>
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all. I have the following code: http://jsfiddle.net/g7Cgg/ As you can see, there are
All of this is code is here: http://jsfiddle.net/yrgK8/ I have a news section which
I have the following code at JSfiddle: http://jsfiddle.net/ACG2D/ $(document).ready(function() { $('.testThis').click(function() { $('.regexValidation').each(function() {
I have the following code which I got from http://css-tricks.com/startstop-slider/ I have it all
http://jsfiddle.net/yrM3H/2/ I have the following code: jQuery(document).ready(function() { jQuery(.toggle).next(.hidden).hide(); jQuery(.toggle).click(function() { $('.active').toggleClass('active').next('.hidden').slideToggle(300); $(this).toggleClass('active').next().slideToggle(fast); });
I have the following code: http://jsfiddle.net/LvdcU/3/ I don't understand why I keep getting the
I have the following code: http://jsfiddle.net/YfzbZ/ HTML <dl class=dropdown right> <dt><a>Options</a></dt> <dd> <ul style=display:none;>
I have the following code. http://jsfiddle.net/CtMmT/4/ Now i need to remove the text from
I'm playing around with a web site at the following address http://jsfiddle.net/deltanovember/h63Vx/3/ The code
Here is my current code, http://jsfiddle.net/HRZ3D/2/ with it I have been unable to do

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.