<?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>Takin&#039; a Bathew &#187; rounded corner</title>
	<atom:link href="http://bathew.com/tag/rounded-corner/feed/" rel="self" type="application/rss+xml" />
	<link>http://bathew.com</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 03:55:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Rounded Corner Form Elements</title>
		<link>http://bathew.com/playhouse/rounded-corner-form-elements/</link>
		<comments>http://bathew.com/playhouse/rounded-corner-form-elements/#comments</comments>
		<pubDate>Wed, 07 May 2008 22:05:06 +0000</pubDate>
		<dc:creator>mbathon</dc:creator>
				<category><![CDATA[Playhouse]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[rounded corner]]></category>

		<guid isPermaLink="false">http://www.bathew.com/?p=8</guid>
		<description><![CDATA[One task I am being faced with more often when creating form elements is the use of rounded corners on text inputs, select boxes and text areas. One solution in dealing with this dilemma is just to crop out the round corner image from the concept file, give the form elements a border that matched [...]]]></description>
			<content:encoded><![CDATA[<p>One task I am being faced with more often when creating form elements is the use of rounded corners on text inputs, select boxes and text areas. One solution in dealing with this dilemma is just to crop out the round corner image from the concept file, give the form elements a border that matched the background color and place them into that area. This way may be the simplest answer to the problem but it is riddled with problems.</p>
<ol>
<li>When a user resizes the text, the box will not expand.</li>
<li>You will need a new image for each different size of input you need.</li>
<li>Absolute positioning (and the resulting extra <abbr title="Cascading Style Sheets">CSS</abbr> lines will need to be added) is the only sure way to line up the inputs inside the image</li>
</ol>
<p><span id="more-8"></span>In order to work through these issues and out clean scalable rounded corner form elements we will first begin by creating the HTML code for the input elements.</p>
<ul>
<li><code>&lt;strong&gt;</code></li>
<li><code>&lt;em&gt;</code></li>
<li><code>&lt;span&gt;</code></li>
<li><code>&lt;span&gt;</code></li>
</ul>
<p>These will provide the hooks our CSS will need in order to create the rounded corners. You can use any HTML tags you would like to surround the code as long as you can add a style to it.</p>
<p>The strong and the em tag will receive longer images that will account for and size changes on the input fields and text size increases. The other two images will just be images of the corners. The two longer images will need to have a transparent background for the color inside the lines. If you have a non-solid color background just make the bottom left image have the background and the top right image transparent.</p>
<h3>The CSS</h3>
<pre class="brush: css; title: ; notranslate">
strong {background: url(/images/input-bottom-left.gif) no-repeat 0 100%; display: block; float: left;}/*longer sides*/
strong em {background: url(/images/input-top-right.gif) no-repeat 100% 0; display: block; float: left;}/*longer sides*/
strong em span {background: url(/images/input-bottom-right.gif) no-repeat 100% 100%; display: block; float: left;}
strong em span span {background: url(/images/input-top-left.gif) no-repeat; display: block; float: left;}
input, select, textarea {margin: 1px 3px; border: 1px solid #fff;}
</pre>
<h3>The HTML</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;form&gt;
&lt;fieldset&gt;
&lt;legend&gt;Rounded Corner Form Elements&lt;/legend&gt;
&lt;label for=&quot;txtFirstName&quot;&gt;First Name:&lt;/label&gt;
&lt;strong&gt;&lt;em&gt;&lt;span&gt;&lt;span&gt;&lt;input id=&quot;txtFirstName&quot; maxlength=&quot;50&quot; name=&quot;FirstName&quot; size=&quot;25&quot; type=&quot;text&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;label for=&quot;txtLastName&quot;&gt;Last Name:&lt;/label&gt;
&lt;strong&gt;&lt;em&gt;&lt;span&gt;&lt;span&gt;&lt;input id=&quot;txtLastName&quot; maxlength=&quot;50&quot; name=&quot;LastName&quot; size=&quot;15&quot; type=&quot;text&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;label for=&quot;txtaraComment&quot;&gt;Comment&lt;/label&gt;
&lt;strong&gt;&lt;em&gt;&lt;span&gt;&lt;span&gt;&lt;textarea id=&quot;txtaraComment&quot; cols=&quot;50&quot; rows=&quot;10&quot; name=&quot;Comment&quot;&gt;&lt;/textarea&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;/fieldset&gt;
&lt;/form&gt;
</pre>

<form class="frmRoundedCorner" method="post">
<fieldset>
<legend>Rounded Corner Form Elements</legend>
<label for="txtFirstName">First Name:</label>
<strong><em><span><span><input id="txtFirstName" maxlength="50" name="FirstName" size="25" type="text" /></span></span></em></strong><br />
<label for="txtLastName">Last Name:</label>
<strong><em><span><span><input id="txtLastName" maxlength="50" name="LastName" size="15" type="text" /></span></span></em></strong><br />
<label for="txtaraComment">Comment</label>
<strong><em><span><span><textarea id="txtaraComment" cols="50" rows="10" name="Comment"></textarea></span></span></em></strong><br />
</fieldset>
</form> 
 <img src="http://bathew.com/writings/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=8" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://bathew.com/playhouse/rounded-corner-form-elements/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
	</channel>
</rss>

