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

  • Home
  • SEARCH
  • 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 7861593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:47:44+00:00 2026-06-02T22:47:44+00:00

I have tried everything to align these boxes, so they start from the same

  • 0

I have tried everything to align these boxes, so they start from the same place downwards.
I’m not sure which div to put in my stylesheet

 <div class="boxes">
 <p class="h3"> You are able to add up to 3 addresses.
 Please select the type of address, using the following guide
 <ul>
 <li>H: Permanent home address</li>
 <li>P: Postal address (where you will be from June to September)</li>
 <li>L: Local address (where you currently live)</li>
 </ul>
 </p>

<div id="address">

<div id="input1" style="margin-bottom:4px;" class="input">
Street<span class="required">*</span>
<input name="Street[]"  type="text" >
</div>

<div id="input2" style="margin-bottom:4px;" class="input">
Line2
<input name="Line2[]"  type="text" >
</div>

<div id="input3" style="margin-bottom:4px;" class="input">
Line3
<input name="Line3[]"  type="text" > 
</div>

Any ideas?

  • 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-02T22:47:46+00:00Added an answer on June 2, 2026 at 10:47 pm

    Having amended your HTML, to wrap the label/associated text in actual label elements, added a for attribute to those elements and a corresponding id attribute to the input elements:

    <div class="boxes">
        <p class="h3">
             You are able to add up to 3 addresses. Please select the type of address, using the following guide
            <ul>
                <li>H: Permanent home address</li>
                <li>P: Postal address (where you will be from June to September)</li>
                <li>L: Local address (where you currently live)</li>
            </ul>
        </p>
        <div id="address">
            <div id="input1" style="margin-bottom:4px;" class="input">
                <label for="street">Street<span class="required">*</span></label><input name="Street[]" id="street" type="text">
            </div>
            <div id="input2" style="margin-bottom:4px;" class="input">
                 <label for="line2">Line2</label><input id="line2" name="Line2[]" type="text">
            </div>
            <div id="input3" style="margin-bottom:4px;" class="input">
                 <label for="line3">Line3</label><input id="line3" name="Line3[]" type="text">
            </div>
        </div>
    </div>​
    

    The following CSS works:

    #address label {
        display: inline-block;
        width: 5em;
        text-align: right;
        padding-right: 0.5em;
    }
    #address input {
        display: inline-block;
    }​
    

    JS Fiddle demo.

    In the above, once the text was wrapped in a tag (to become the label element), it could then be assigned display: inline-block; and could then be given a width. Also, white-space was removed from between the close of the label and the opening of the input, in order to prevent white-space in the HTML file causing any space between the two elements.

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

Sidebar

Related Questions

I have not found a solution yet... I tried everything border:0; border:none; outline:none; without
I have tried everything, searched the net for two hours or even more and
Having an issue here that I have tried everything I can think of but
I have tried to draw a bar in a cell of my table. Everything
I've tried almost everything. In my nginx.conf I have rails_env set to production in
I have tried this but it does not work (even if I specify .wav
I have tried everything. I cannot get this centered on the screen. I am
So I've been struggling on a rather weird problem. I've tried everything from display:inline-block
I don't understand this: I have tried to center the text-align of a HTML
I have tried everything I can think of to get this to work, to

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.