Created
September 9, 2015 09:06
-
-
Save sanjaybhowmick/34218ad73ba5662848fe to your computer and use it in GitHub Desktop.
Style your web form with CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label | |
{ | |
width: 15em; | |
float: left; | |
text-align: left; | |
margin-right: 0.5em; | |
display: block; | |
color: #990000; | |
font-weight: bold; | |
font-family: Verdana, Arial, Helvetica, sans-serif; | |
font-size: 12px; | |
} | |
input | |
{ | |
color: #781351; | |
background: #CCCCCC; | |
border: 1px solid #781351; | |
} | |
legend | |
{ | |
color: #fff; | |
background: #ffa20c; | |
border: 1px solid #781351; | |
padding: 2px 6px; | |
font-weight: bold; | |
font-family: sans-serif | |
} | |
fieldset | |
{ | |
border: 1px solid #781351; | |
width: 25em; | |
padding : 0.5em 1em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="" name="userForm" method="post"> | |
<fieldset> | |
<legend>User Registration Form</legend> | |
<h4>Provide user details below</h4> | |
<p><label for=”name”>User Name:</label> <input type="text" id="name" /></p> | |
<p><label for=”address”>Address:</label> <input type="text" id="address" /></p> | |
<p><label for=”city”>City:</label> <input type="text" id="city" /><br /></p> | |
<p><label for=”pin”>Pin code:</label> <input type="text" id="pin" /><br /></p> | |
<p><label for=”contact”>Contact number:</label> <input type="text" id="contact" /><br /></p> | |
</fieldset> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment