Maybe it's because I've been staring at this too long and have gone cross-eyed, but I can't for the life of me figure out how to adjust the spacing of a very simple form that I am attempting to do in CSS. The form has 3 input fields: a text box, a single level dropdown, and a submit button. The form should be flushed over to the right of the page to make room for eventual added content. The form itself is also quite simple. The text box on a line by itself. Directly below that is the single drop down and then, to the right, the submit button. I have everything set up in this manner, but, when I add the image file I use for the submit button, the drop down menu has space above it, while the submit button is flush up against the text input field above. What I'm trying to figure out is how to line up the drop down and the submit button so that they are in line with each other. I've tried tinkering with the padding and margins of both but to no avail. I think this might be something stupid, as this only happens with the image file. For example, replacing the image file with text causes all of the spacing to act as I'd expect -- flush up against the text input field above. I've checked the image though, and the additional space is not in the image. CSS div#quickSearch { width: 400px; float: right; text-align: right; margin-top: 35px; } div#quickSearch input#terms { margin-bottom: 0px; border: solid 1px #CCC; background-color: #FFF; } div#quickSearch input#submitButton { padding: 0; margin: 0; } div#quickSearch select { margin: 0px; border: solid 1px #CCC; background-color: #FFF;} XHTML <div id="quickSearch"> <form> <input type="text" size="25" name="terms" id="terms"/><br /> <select> <option>Candidates/Resumes</option> <option>Submissions</option> <option>Requisitions</option> <option>Contracts/Clients</option> </select> <input type="image" src="images/search.gif" name="submit" id="submitButton"/> </form> </div> Code (markup):
put the div tag on dropdown menu with float: left; and another div for submit image with float: right; pls observe the width of those 2.. it must not exceed the width of the your div#quickSearch