Tim Wilkinson
Tim Wilkinson

Reputation: 3801

Form submit box won't align

I have a simple form to add your email to a mailing list however i want to align the last input field and the submit button side by side without using a negative margin.

http://bettondesignwork.co.uk/miltoun this is the site with the form.

this is the css

    form .inputbox{border:#666476 1px solid; color:#c3c2c9; height:28px; padding-left:6px;}
    form .name{width:282px; margin:0 0 10px;}
    form .email{width:215px; vertical-align:bottom;}
    form .submit{width:60px; background:#666476; color:#e7dbcf; border:none; height:32px; margin:0; padding:0; border:#666476 1px solid;}

i have tried giving the email and submit forms a 0 margin and 0 padding, but they will just not sit flush side by side. any clues as to how this is achieved?

Upvotes: 0

Views: 354

Answers (2)

Drath
Drath

Reputation: 325

Remove the space/tab/new line between your two input elements in your source code and they should sit flush.

Upvotes: 0

tw16
tw16

Reputation: 29575

Just add float:left to aside form .email like below:

aside form .email {
    vertical-align: bottom;
    width: 215px;
    float: left; /* add this */
}

Upvotes: 1

Related Questions