html - spacing between form fields -


i have html form element:

<form action="doit" id="doit" method="post"> name <br/> <input id="name" name="name" type="text" /> <br/> phone number <br/> <input id="phone" name="phone" type="text" /> <br/> year <br/> <input id="year" name="year" type="text" /> <br/> </form> 

i there little more space between fields, example, between lines

<input id="name" name="name" type="text" /> <br/> , phone number <br/>,

and between

<input id="phone" name="phone" type="text" /> <br/> , year <br/>.

how can it?

i wrap rows in labels

<form action="doit" id="doit" method="post">     <label>         name         <input id="name" name="name" type="text" />     </label>     <label>         phone number         <input id="phone" name="phone" type="text" />     </label>     <label>         year         <input id="year" name="year" type="text" />     </label> </form> 

and use

label, input {     display: block; }  label {     margin-bottom: 20px; } 

don't use brs spacing!

demo: http://jsfiddle.net/d8w2q/


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -