<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tutorials Palace &#187; CSS Form Tutorial</title>
	<atom:link href="http://www.tutorialspalace.com/tag/css-form-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tutorialspalace.com</link>
	<description></description>
	<lastBuildDate>Mon, 06 Feb 2012 08:40:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Designing of Beautiful Contact Form</title>
		<link>http://www.tutorialspalace.com/2010/01/designing-of-beautiful-contact-form/</link>
		<comments>http://www.tutorialspalace.com/2010/01/designing-of-beautiful-contact-form/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 16:56:42 +0000</pubDate>
		<dc:creator>Muhammad Khizar</dc:creator>
				<category><![CDATA[CSS/HTML]]></category>
		<category><![CDATA[CSS Form Tutorial]]></category>
		<category><![CDATA[CSS From]]></category>
		<category><![CDATA[Nice Form Tutorial]]></category>

		<guid isPermaLink="false">http://www.tutorialspalace.com/?p=1134</guid>
		<description><![CDATA[I hope that this will be an interesting tutorial for you. I want to demonstrate that how I style my form input fields that is cross browser compatible all with just CSS. This is totally a new layout. All of us creates forms on websites, it may be a blog, e-commerce or even a personal [...]]]></description>
			<content:encoded><![CDATA[<p>I hope that this will be an interesting tutorial for you. I want to demonstrate that how I style my form input fields that is cross browser compatible all with just CSS. This is totally a new layout.<br />
<span id="more-1134"></span><br />
All of us creates forms on websites, it may be a blog, e-commerce or even a personal site. The way I did it in the past was declared a background image on the input element which I soon found will not work correctly. Instead I needed to put the background image on a hook like a paragraph tag and absolutely position the input element within the background image thus allowing full control of the position of the text input. Lets checkout first that what we will achieve.</p>
<p>I took the liberty of commenting anything that is not immediately clear in the CSS.</p>
<p>Now let’s take a look at the code.</p>
<p><strong>HTML</strong></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre>
<pre>&lt;form id=&quot;nice-form&quot; method=&quot;post&quot;&gt; &lt;fieldset&gt;

&lt;legend&gt;Nice Contact Form&lt;/legend&gt;

&lt;label for=&quot;name&quot;&gt;Name:&lt;/label&gt;

&lt;input name=&quot;name&quot; type=&quot;text&quot; /&gt;&lt;label for=&quot;email&quot;&gt;Email:&lt;/label&gt;

&lt;input name=&quot;email&quot; type=&quot;email&quot; /&gt;&lt;label for=&quot;message&quot;&gt;Message:&lt;/label&gt;

&lt;textarea cols=&quot;40&quot; rows=&quot;10&quot; name=&quot;message&quot;&gt;&lt;/textarea&gt;

&lt;/fieldset&gt;

&lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&gt; &lt;/form&gt;</pre>
</div>
<p><strong>CSS</strong></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
</pre>
<pre>html, body {
margin:0;
padding:0;
}
#wrapper {
margin:0 auto;
width:960px;
}
fieldset {
border:none;
}
legend {
font-size:30px;
color:#BD2B7B;
font-family:Georgia, &quot;Times New Roman&quot;, Times, serif;
}
#nice-form {
float:right;
margin:20px auto;
width:470px;
}
#nice-form label {
text-indent:-9999px; /*  Move the text off the screen while still keeping accessibility */
display:inline-block;
}
#nice-form p.name {
background:url(../images/nameinput.png) no-repeat scroll top left;
width:446px;
height:62px;
position:relative; /* To allow child containers to be positioned absolutely */
clear:both;
display:block;
}
#nice-form p.name input {
position:absolute; /* To position this container absolutely inside of #nice-form p.name parent container */
top:10px;
left:130px;
border:none; /* By default, the input field will show a border/box, this sets it to not display anything */
font-size:30px;
width:300px; /* This keeps the text within the background image so the text will not type outside of that area */
background:none; /* This sets the background color to none so you will not see a default white */
font-family:Georgia, &quot;Times New Roman&quot;, Times, serif;
color:#999;
display:block;
}
#nice-form p.email {
background:url(../images/emailinput.png) no-repeat scroll top left;
width:446px;
height:62px;
position:relative;
clear:both;
display:block;
}
#nice-form p.email input {
position:absolute; /* To position this container absolutely inside of #nice-form p.name parent container */
top:10px;
left:130px;
border:none; /* By default, the input field will show a border/box, this sets it to not display anything */
font-size:30px;
width:300px; /* This keeps the text within the background image so the text will not type outside of that area */
background:none; /* This sets the background color to none so you will not see a default white */
font-family:Georgia, &quot;Times New Roman&quot;, Times, serif;
color:#999;
display:block;
}
#nice-form p.textarea {
background:url(../images/textinput.png) no-repeat scroll top left;
width:446px;
height:302px;
position:relative;
}
#nice-form p.textarea textarea {
position:absolute; /* To position this container absolutely inside of #nice-form p.name parent container */
top:20px;
left:140px;
border:none; /* By default, the input field will show a border/box, this sets it to not display anything */
font-size:20px;
width:290px; /* This keeps the text within the background image so the text will not type outside of that area */
background:none; /* This sets the background color to none so you will not see a default white */
font-family:Georgia, &quot;Times New Roman&quot;, Times, serif;
color:#999;
overflow:auto; /* This ensures that there should be any text overflow, it would automatically determine to use vertical and horizontal scrollbars */
display:block;
}
#nice-form .button {
background:url(../images/button.png) no-repeat top left;
width:121px;
height:57px;
text-indent:-9999px;  /*  Move the text off the screen while still keeping accessibility */
border:none; /* This sets the background color to none so you will not see a default white */
cursor:pointer; /*Since we are using a background image, this will set the mouse cursor to change when hovering over so you know it is a clickable button */
overflow:hidden; /* hides any graphic/image element if it overflows */
display:block;
line-height:0; /* this is really a hack for IE6 and IE7 because text-indent will not work here unless the line-height is set to zero */
}</pre>
</div>
<p>This technique has been tested on IE6,IE7,IE8,FF (latest), Opera (latest), Safari (latest), and Chrome (latest).</p>
<p>Although I know this wasn’t a step by step tutorial but I figure the comments on the stylesheet should explain most of whats going on. But if for some reason you think this does not suffice, please let me know and I will write this out in a tutorial step by step style. Enjoy and have fun!</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li><a href="http://www.tutorialspalace.com/2011/01/short-films-and-music-videos-using-after-effects/" title="Short Films and Music Videos Using After Effects"><img src="http://www.tutorialspalace.com/wp-content/uploads/2010/12/20-short-film-videos-source.jpg" alt="20 short film videos source Designing of Beautiful Contact Form"  title="Designing of Beautiful Contact Form" /></a><a href="http://www.tutorialspalace.com/2011/01/short-films-and-music-videos-using-after-effects/" title="Short Films and Music Videos Using After Effects">Short Films and Music Videos Using After Effects</a></li><li><a href="http://www.tutorialspalace.com/2011/10/the-pros-and-cons-of-the-facebook-subscribe-feature/" title="The Pros and Cons of the Facebook Subscribe Feature "><img src="http://www.tutorialspalace.com/wp-content/uploads/2011/10/pros-cons-facebook-subscribe-feaatures.jpg" alt="pros cons facebook subscribe feaatures Designing of Beautiful Contact Form"  title="Designing of Beautiful Contact Form" /></a><a href="http://www.tutorialspalace.com/2011/10/the-pros-and-cons-of-the-facebook-subscribe-feature/" title="The Pros and Cons of the Facebook Subscribe Feature ">The Pros and Cons of the Facebook Subscribe Feature </a></li><li><a href="http://www.tutorialspalace.com/2010/04/php-upload-single-file/" title="PHP Upload Single File"><img src="http://www.tutorialspalace.com/wp-content/uploads/2010/04/php-single-fl-up-head.jpg" alt="php single fl up head Designing of Beautiful Contact Form"  title="Designing of Beautiful Contact Form" /></a><a href="http://www.tutorialspalace.com/2010/04/php-upload-single-file/" title="PHP Upload Single File">PHP Upload Single File</a></li><li><a href="http://www.tutorialspalace.com/2011/08/best-tutorials-tips-resources-and-examples-of-jquery-ui/" title="Best Tutorials, Tips, Resources and Examples of jQuery UI"><img src="http://www.tutorialspalace.com/wp-content/uploads/2011/08/jquery-tutorials-tips.jpg" alt="jquery tutorials tips Designing of Beautiful Contact Form"  title="Designing of Beautiful Contact Form" /></a><a href="http://www.tutorialspalace.com/2011/08/best-tutorials-tips-resources-and-examples-of-jquery-ui/" title="Best Tutorials, Tips, Resources and Examples of jQuery UI">Best Tutorials, Tips, Resources and Examples of jQuery UI</a></li><li><a href="http://www.tutorialspalace.com/2010/09/encrypting-password-using-md5-function/" title="Encrypting Password Using md5() Function"><img src="http://www.tutorialspalace.com/wp-content/uploads/2010/04/php-pass-enc-head.jpg" alt="php pass enc head Designing of Beautiful Contact Form"  title="Designing of Beautiful Contact Form" /></a><a href="http://www.tutorialspalace.com/2010/09/encrypting-password-using-md5-function/" title="Encrypting Password Using md5() Function">Encrypting Password Using md5() Function</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tutorialspalace.com/2010/01/designing-of-beautiful-contact-form/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

