<?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>DesignBash &#187; CSS</title>
	<atom:link href="http://www.designbash.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designbash.com</link>
	<description>web magazine and more...</description>
	<lastBuildDate>Wed, 17 Mar 2010 20:57:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rounded CSS Corners &#8211; The Basics</title>
		<link>http://www.designbash.com/css/rounded-css-corners-the-basics/</link>
		<comments>http://www.designbash.com/css/rounded-css-corners-the-basics/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 21:04:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=284</guid>
		<description><![CDATA[For those of us who no longer want to support Microsoft's lagging browsers, the best and fastest way to create rounded corners is by using CSS. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.designbash.com/css/rounded-css-corners-the-basics/"><img src="http://www.designbash.com/wp-content/uploads/2010/02/rounded-corners-CSS.jpg" alt="CSS Rounded Corners" title="rounded-corners-CSS" width="500" height="120" class="aligncenter size-full wp-image-297" /></a><br />
For those of us who no longer want to support Microsoft&#8217;s lagging browsers the best <em>(and fastest)</em> way to create rounded corners is by using CSS3. Using CSS corners will dramatically reduce your development time while keeping your markup clean and flexible.<span id="more-284"></span></p>
<p>As it stands, rounded corners are currently supported in modern versions of <strong>Firefox, Safari, and Chrome</strong>. Unfortunately, you&#8217;ll need to use two different declarations to get all these browsers working. The basic declarations should look something like this:</p>
<pre class="brush:css">

/* Supported in Firefox */
-moz-border-radius
-moz-border-radius-topleft
-moz-border-radius-topright
-moz-border-radius-bottomleft
-moz-border-radius-bottomright

/* Supported in Chrome and Safari */
-webkit-border-radius
-webkit-border-top-left-radius
-webkit-border-top-right-radius
-webkit-border-bottom-left-radius
-webkit-border-bottom-right-radius
</pre>
<h3>The Rounded Example</h3>
<p>Below you will find an example of rounded corners in action. If you&#8217;re using a modern browser you should see the grey box with rounded corners. <em>(if using IE, I&#8217;ve put in a screenshot of what things look like when using a respectable browser)</em></p>
<pre class="brush:css">
.rounded {
width: 500px;
padding: 30px 0px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
</pre>
<div style="background: #ffffff; padding: 30px 0; border: 1px solid #cccccc; margin-bottom: 15px;">
<div style="background: #cccccc; width: 450px; margin: 15px auto; padding: 30px 0; -moz-border-radius: 10px; -webkit-border-radius: 10px;">
<p style="text-align: center; margin: 0; padding: 0;">This paragraph is inside a rounded DIV</p>
</div>
</div>
<h3>Screenshot Example For Internet Explorer <em>(sigh&#8230;)</em></h3>
<p><img style="border: 1px solid #cccccc;" src="http://www.designbash.com/wp-content/uploads/2010/02/ie-rounded-css.png" alt="ie Rounded Rectangle CSS Example" title="ie-rounded-css" width="558" height="170" class="aligncenter size-full wp-image-292" /></p>
<h3>But What Does the W3C Say?</h3>
<p>Due to the fact that border-radius is not officially supported by any browser, it might be a good idea to check out what the W3C has to say about the subject. I was surprised to see how detailed they were and I highly recommend <strong><a href="http://www.w3.org/TR/css3-background/#the-border-radius">checking out their official specs</a></strong>. As a reference, the official (but currently unsupported) declarations are:</p>
<pre class="brush:css">
border-radius
border-top-right-radius
border-bottom-right-radius
border-bottom-left-radius
border-top-left-radius
</pre>
<p>There are tons of neat variations you can do, but they go a little beyond the scope of this article. Check out the W3C specs for the full explanation, or, check out some of these links that do a good job documenting css rounded corners:</p>
<ul>
<li><a href="http://www.css3.info/preview/rounded-border/">CSS3 Info</a></li>
<li><a href="http://www.the-art-of-web.com/css/border-radius/">The Art of Web</a></li>
<li><a href="http://www.zenelements.com/blog/css3-border-radius-rounded-corners/">Zen Elements</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/css/rounded-css-corners-the-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
