I’m trying to create a custom form input that utilizes some images, it should look like this:

I’ve tried the following:
<style>
input {
background-image: url(../img/search-background-middle.png);
background-repeat: repeat-x;
padding: 17px 0;
font-size: 12px;
border: none;
margin: 0;
}
form {
padding: 0;
margin: 0;
}
</style>
<body>
<form>
<img src="../img/search-background-left.png"/>
<input type="text" value=" start typing to search..." size="40" maxlength="255" />
<img src="../img/search-background-right.png"/>
</form>
</body>
Which results in:

Why?? I’m not only interested in the solution, but also in the reason why this doesn’t work. I think my understanding of inline elements put next to each other is flawed.
Try setting the vertical-align to top
also remove the spaces between the
imgs and theinput