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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:31:54+00:00 2026-06-13T10:31:54+00:00

I have created a form and it is supposed to look like this: Can

  • 0

I have created a form and it is supposed to look like this:

screenshot

Can someone please help me edit my code to look like the above image and explain what I was doing wrong? A JSFiddle would be amazing so I can understand how to fix it.

The zip label and field needs to be brought up and the submit button pushed to the right, yet it’s not working for me 🙁

My attempt is as follows:

http://jsfiddle.net/2w6mK/

CSS:

    #form-container {
    width: 710px;
    height: 450px;
    padding: 20px 50px;
    margin: 35px 0 0 25px;
    }

form {
    position: relative;
    margin-left: -10px;
    }

form label {
    display: block;
    font: normal 12px/16px arial, Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    text-align: left;
    }

form [type="text"],

form [type="email"] {
    display: block;
    border: 1px solid #000;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
    border-radius: 2px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
    box-sizing: border-box;
    font: 12px/14px arial, helvetica, verdana, sans-serif;
    width: 60%;
    padding: 5px 5px;
    margin: 5px 0;
        -webkit-appearance: none;
    }

.zip {
    display: block;
    border: 1px solid #000;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
    border-radius: 2px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
    box-sizing: border-box;
    font: 12px/14px arial, helvetica, verdana, sans-serif;
    width: 20%;
    padding: 5px 5px;
    margin: 5px 0;
        -webkit-appearance: none;
    }

.dob-select {
       display: block;
    border: 1px solid #000;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
    border-radius: 2px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
    box-sizing: border-box;
    font: 12px/14px arial, helvetica, verdana, sans-serif;
    width: 80px;
    height:25px;
        -webkit-appearance: none;
   overflow: hidden;
   background: url("http://s17.postimage.org/4tmf81arf/down_arrow.png") no-repeat right #fff;
   float: left;
   margin-right: 5px;
}

.dob-select select {
   background: transparent;
   width: 125px;
   height: 25px;
   border: none;
   padding: 5px 0 0 5px;
   color: #cccccc;
}

.left {
    float: left;    
}
form [type="submit"] {
    display: block;
    background-image: url("http://findmuck.files.wordpress.com/2012/06/green_submit_button_by_rukiaxichigo15.jpg") no-repeat;
    margin: 25px auto;
    width: 154px;
    height:57px;
    border: none;
    color: transparent;
    font-size: 0;
    float: left;
    }

form input[type=submit]:hover {
    background-image: url("http://findmuck.files.wordpress.com/2012/06/green_submit_button_by_rukiaxichigo15.jpg") no-repeat;
    cursor: hand;
    cursor: pointer;
}

#FileUpload {
    position:relative;
    margin-top: -13px;
    padding-bottom: 15px;
    }

#BrowserVisible {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background:url(images/btn_browse.gif) 100% 0px no-repeat;
    height:27px;
    width:390px;
    cursor: hand;
    cursor: pointer;
}

#FileField {
    display: block;
    margin-right: 85px;
    border: 1px solid #000;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
    border-radius: 2px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
    box-sizing: border-box;
    font: 12px/14px arial, helvetica, verdana, sans-serif;
    color: #777;
    width: 300px;
    padding: 5px 5px;
    -webkit-appearance: none;
}

HTML:

<div id="form-container">              

            <form>

                <fieldset>
                    <label for="name">Name</label>
                    <input type="text" name="name">
                </fieldset>

                <fieldset>
                <label for="dob">date of birth</label>
                <div class="dob-select">
                <select name="dob_day">
                <option value="01">01</option>

                </select>
                </div>
                <div class="dob-select">
                <select name="dob_month">
                <option value="01">Jan</option>
                </select>
                </div>
                <div class="dob-select">
                <select name="dob_year">
                <option value="2012">2012</option>
                </select>
                </div>
                </fieldset>

                <fieldset>
                    <label for="zip">zip</label>
                    <input type="text" class="short" name="zip">
                </fieldset>

                <fieldset>
                    <label for="email">Email</label>
                    <input type="email" name="email">
                </fieldset>

                <fieldset>                
                    <label for="subscribe"><input type="checkbox" class="left"> <p class="left">Tick</p></label>
                    <input type="submit" name="submit">
                </fieldset>       
            </form>

</div>
  • 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-13T10:31:55+00:00Added an answer on June 13, 2026 at 10:31 am

    EDIT 2:

    Add

    .short{
      width: auto !important;
    }
    

    to CSS to draw the ZIP field with full lenght as in picture.


    EDIT: remove border: 1px solid silver; when you have understood how positioning is working, it’s for debug purpose 😉


    Look at: http://jsfiddle.net/pb6mM/3/

    form input[type="submit"]{
        position: absolute;
        right: 0;
        bottom: 0;
    }
    
    fieldset{
        border: 1px solid silver;
    }
    
    .fieldsetDate{    
        padding-right: 30px;
    }
    
    .inlineBlock{
        display: inline-block;
    }
    

    And added

       margin-top: 6px;
       margin-bottom: 6px;
    

    to .dob-select { to make it the same height of the normal text field.

    HTML:

    <div id="form-container">              
    
                <form>
    
                    <fieldset>
                        <label for="name">Name</label>
                        <input type="text" name="name">
                    </fieldset>
    
                    <fieldset class="fieldsetDate inlineBlock">
                    <label for="dob">date of birth</label>
                    <div class="dob-select">
                    <select name="dob_day">
                    <option value="01">01</option>
    
                    </select>
                    </div>
                    <div class="dob-select" >
                    <select name="dob_month">
                    <option value="01">Jan</option>
                    </select>
                    </div>
                    <div class="dob-select">
                    <select name="dob_year">
                    <option value="2012">2012</option>
                    </select>
                    </div>
                    </fieldset>
    
                    <fieldset class="inlineBlock">
    
                        <label for="zip">zip</label>
                        <input type="text" class="short" name="zip">
    
                    </fieldset>
    
                    <fieldset>
                        <label for="email">Email</label>
                        <input type="email" name="email">
                    </fieldset>
    
                    <fieldset>                
                        <label for="subscribe"><input type="checkbox" class="left"> <p class="left">Tick</p></label>
                        <input type="submit" name="submit">
                    </fieldset>       
                </form>
    
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an input according to the code below. <div> <form id=me runat=server>
I have created this form with several select menu and a couple of jQuery
I have created a form that contains fields used to accept a floating value
I have created a form <form name=form1 method=post> <textarea rows=5 cols=20 name=ta1></textarea> <input type=submit
I have created a form with knockout that will allow the ability to give
I have created a form to upload a a newsletter into the database. I'm
I have created a form that is used for both adding and editing a
I have created a form with a dropdown list for 'Region'. Once the form
I have created a form for my news articles which I then call to
I have created a form on which two components are present, button and progressbar

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.