1

I want the input boxes to all line up together on the right edge I am not sure how to do this.

Here is an image that shows what I want to do

http://jsfiddle.net/Q9b62/

Here is my CSS:

.bookingForm {
height:450px;
background-color: #D3412A;
}

form{
padding:20px 0 0 70px;
margin-left: 10%;
}

form select,form input,form textarea {
margin:8px 0;
}

.bookingForm .formColumn1,
.bookingForm .formColumn2{
float:left;
}

3 Answers 3

1

Try this

I have done a demo on codepen. http://cdpn.io/vCzgb

Sign up to request clarification or add additional context in comments.

Comments

0

I'm not sure if this is what you're after. Just update your CSS with this:

form select,form input,form textarea {
    margin:8px 0;
    display:inline-block;
}
form label{
    display:inline-block;
    min-width:30%;

}

This will allow the label to stay on the left side, and the text-area, input and select will be to the right of the label. This is assuming I understood your question correctly :)

Comments

0

Check this link http://jsfiddle.net/Q9b62/5/

I have changed some css let me know if you dont understand any thing.

.container {
    width: 960px;
    margin:0 auto;
    background-color: blue;
}

.bookingForm {
    height:auto;
    background-color: #D3412A;
}
.bookingForm:before, .bookingForm :after {
    content: "";
    display: table;
    line-height: 0;
}
.bookingForm :after {
    clear: both;
}


form{
    padding:20px 0 0 70px;
    margin-left: 10%;
}

form select,form input,form textarea {
    margin:8px 8px 8px 0;
}

.bookingForm .formColumn1,
.bookingForm .formColumn2{
    float:left;
}
label{
    display:inline-block;
    width: 120px;
}
label[for="additionalInfo"]{
    width: auto;
    display: block;
}

2 Comments

sorry i didn't saw your fiddle. I am looking at it right now
Now that i saw your screenshot this is the updated css which will create the exact same look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.