18 May, 2009
Puur en zuiver formulier template
Categoriën: Color | Xhtml Strict | crossbrowser | form | template | valid
Nog een eenvoudig formulier template, zo zuiver dat er alleen het nodige aan elementen inzit, want meer heb je niet nodig om een formulier er goed te laten uitzien.
HTML
<div id="stylized" class="myform"> <form id="form" name="form" method="post" action="index.html"> <h1>Formulier</h1> <p>Eenvoudig en zuiver formulier</p> <label>Naam <span class="small">Geef uw naam</span> </label> <input type="text" name="name" id="name" /> <label>Email <span class="small">Geef een valide adres</span> </label> <input type="text" name="email" id="email" /> <label>Paswoord <span class="small">Min. 6 chars</span> </label> <input type="text" name="password" id="password" /> <button type="submit">Verstuur</button> <div class="spacer"></div> </form> </div>
CSS
body{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
}
p, h1, form, button{border:0; margin:0; padding:0;}
.spacer{clear:both; height:1px;}
/* ----------- Mijn Formulier ----------- */
.myform{
margin:0 auto;
width:400px;
padding:14px;
}
#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}
#stylized h1 {
font-size:14px;
font-weight:bold;
margin-bottom:8px;
}
#stylized p{
font-size:11px;
color:#666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
}
#stylized label{
display:block;
font-weight:bold;
text-align:right;
width:140px;
float:left;
}
#stylized .small{
color:#666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:140px;
}
#stylized input{
float:left;
font-size:12px;
padding:4px 2px;
border:solid 1px #aacfe4;
width:200px;
margin:2px 0 20px 10px;
}
#stylized button{
clear:both;
margin-left:150px;
width:125px;
height:31px;
background:#666 url(img/button.png) no-repeat;
text-align:center;
line-height:31px;
border: none;
color:#FFF;
font-size:11px;
font-weight:bold;
}