PDA

View Full Version : aligning input image with form



codyodell
02-19-2007, 05:11 PM
Hi all,
I'm having trouble lining up a form image with the label and input field next to it. Here is the url they are on (search form at the top)

http://order.diverge.com

I'm not sure if anyone else has had this problem but I couldn't find ANYTHING about it anywhere. Any help would be appreciated.

ahallicks
02-19-2007, 05:22 PM
Way I did it is to give the text area an id of form_text and the input button an id of search_button and float them both left and position them relatively. Then in the CSS you can play about with padding and margins till they are aligned as you want them

Example... check out the form on http://www.cateringresource.co.uk and the stylesheet at http://www.cateringresource.co.uk/resources/style.css

phoenixshade
02-19-2007, 05:59 PM
Try styling the image with vertical-align:top. This causes the top edge of the image to align with the top edge of the tallest element in the block, in this case the form's input element.

Hope that helps!