Alex Rivera | Logout

How to line up HTML input elements?

Asked 2008-10-07T22:06:17.540
24

I am hoping to find a resource for lining up input elements in a HTML page. I find it difficult to get a select element and a text box to be the same width even when using the width style attribute, and it is even more difficult across browsers. Finally, file inputs seem impossible to get to the same width cross browser. Are there any good guides or tips for accomplishing this? Perhaps there are some default CSS attributes I should be setting.

Edit
Report

1 Answer

0

Do you start your CSS files with some base settings? It may be useful to turn padding and margin off on all elements. I haven't tested to see if this could be affecting select / input elements.

Here's an example CSS Reset from Eric Meyer:

http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

answered 2008-10-07T22:11:42.880

Your Answer