to align this, I would separate the tags formand h1, leaving h1 to the left and the form to the right.
form, user password ( div), inline-blocks, , , , , , label, .
, names , ID name .
div, , , divs , , divs, div, inline blocks
HTML , , :
<div id="header">
<h1>Logo</h1>
<form id="search">
<label>Email <input type="text" name="s-user" id="s-user"></label>
<label>Password<input type="text" name="s-pass" id="s-pass"></label>
<input type="submit" class="submit" value="Submit">
</form>
</div>
CSS, , , :
html, body {margin: 0; padding: 0;}
#header {
border-top:7px solid #505559;
margin:0 auto;
width:970px;
background: #eee;
height: 45px;
padding: 20px 0;
font: 12px arial, sans-serif;
}
#header h1 {
margin-left: 30px;
float: left;
width: 197px;
height: 45px;
background: url(http://dummyimage.com/197x45/fe63a5/000&text=LOGOPIC) no-repeat 0 0;
text-indent: -9999px;
}
#header form {
float: right;
margin-right: 30px;
height: 40px;
padding-top: 8px;
}
#header form label {
display: inline-block;
margin: 0 2px;
}
#header form input {}
#header form #s-user,
#header form #s-pass {
display: block;
width: 250px;
border: 1px solid #eee;
padding: 3px 0 3px 0;
margin-bottom: -1px;
}
#header form .submit {
height: 23px;
vertical-align: bottom;
background: #d743ae;
color: #fff;
border: 1px solid #ddd;
-moz-border-radius: 5px;
border-radius: 5px;
}
:
submit vertical-align:bottom, , label inline-blocks, " " , - , , .