4th Aug
Style your web form with CSS
Post By admin | Find Under: Web Development
We have to use different forms in our website for different purposes like login form, registration form and so on. Web form plays a great role for the user point of view. Simple form attracts the users more to fill up. We can design a simple User Registration form with CSS in a proper manner as like as the image below.

<title>Style Your Form | User Registration</title>
<style>
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;
}
</style>
<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>
If you think this article is useful then you can share this post.
follow us

our recent work

our recent blog posts

most populer tags





