<?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>Inius Trivia &#187; css3</title>
	<atom:link href="http://www.inius.ro/tags/css3/feed" rel="self" type="application/rss+xml" />
	<link>http://www.inius.ro</link>
	<description>Nothing special. Everything.</description>
	<lastBuildDate>Wed, 26 Oct 2011 17:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Nice forms with CSS3</title>
		<link>http://www.inius.ro/posts/4-nice-forms-with-css3.html</link>
		<comments>http://www.inius.ro/posts/4-nice-forms-with-css3.html#comments</comments>
		<pubDate>Fri, 18 Jun 2010 17:52:51 +0000</pubDate>
		<dc:creator>Lucian</dc:creator>
				<category><![CDATA[CSS3 Tests]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://www.inius.ro/?p=4</guid>
		<description><![CDATA[Today I will start writing about CSS3. In fact, I&#8217;m waiting for IE9 in order to be finally able to use CSS3 code in my designs. Until then, we&#8217;ll only make&#8230; exercises. Today I will show you how you can make nice forms using CSS3 selectors and properties. I will use the following: border-radius, box-shadow, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I will start writing about CSS3. In fact, I&#8217;m waiting for IE9 in order to be finally able to use CSS3 code in my designs. Until then, we&#8217;ll only make&#8230; exercises.</p>
<p>Today I will show you how you can make nice forms using CSS3 selectors and properties. I will use the following: <em>border-radius, box-shadow, :nth-child</em> and <em>:checked</em> pseudo-classes.</p>
<h3>What can you do with :checked pseudo-class?</h3>
<p>Well, the <em>:checked</em> pseudo-class is gold for form designers because it makes possible to display or hide certain form elements function of what you&#8217;ve checked. If you need to show some form fields only to the people the filled-in certain preceding fields, <em>:checked</em> does the job.</p>
<p>Let&#8217;s take a look at the form (the screen below contains all the nice improvements):</p>
<p><a href="http://www.inius.ro/wp-content/uploads/2010/06/nice-form.jpg"><img class="aligncenter size-full wp-image-67" title="nice-form" src="http://www.inius.ro/wp-content/uploads/2010/06/nice-form.jpg" alt="Nice form using CSS3" width="533" height="326" /></a>- The orange shadow under the title and the bevel effect were made with <em>text-shadow</em> property.</p>
<pre>	h1 {
		text-shadow: 1px 1px White, 1px 1px 3px Orange;
	}</pre>
<p>- The rounded corners on the form are made using the famous <em>border-radius</em> property.</p>
<p>- The yellow tooltips appear only when you roll-over an element and are shown with the help of <em>:nth-child</em> pseudo-class. The &lt;div&gt; inside the second &lt;td&gt; of every &lt;tr&gt; row has by default display:none on it. But if you :hover the td, the &lt;div&gt; will show up.</p>
<pre>	tr td:nth-child(2) div {
		display:none;
		position:absolute;
		background:#FFFFCC;
		border:1px solid #FFCC99;
		padding:5px;
		left: 210px;
		top:0px;
		font-size:9px;
		min-width:150px;
	}
	tr td:nth-child(2):hover div {
		display:block;
	}
</pre>
<p>- The nice green focus effect appears because of the <em>:focus</em> pseudo-class. You can apply a <em>box-shadow</em> property on focused inputs and you get a nice usability effect.</p>
<p>- The last 2 fields, <em>Business name</em> and <em>Business address</em>, appear only if you check the &#8220;business owner&#8221; option. The syntax is very simple:</p>
<pre>	div.forbusiness {display:none;} /* the content is hidden */
	input:checked + div.forbusiness {display:block} /* using the +
	selector we'll display the content when the preceding
	input is checked! */
</pre>
<h3>Troubleshoot</h3>
<ul>
<li>On Internet Explorer 8, almost everything is broken. Quite normal!</li>
<li>On Firefox 3.6.3, a very fine shadow, marking the former top border place, will persist on the screen when you check the first input and show the &lt;legend&gt;.</li>
<li>On Opera 10.5+ when you want to display the &lt;legend&gt; the browser will &#8220;forget&#8221; the border-radius property.</li>
<li>On Safari 4.0 and Google Chrome instead of &lt;legend&gt; you will see a line.</li>
</ul>
<p>View <a title="nice forms with css3" href="http://www.inius.ro/samples/forms.html" target="_blank">the live sample here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.inius.ro/posts/4-nice-forms-with-css3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

