<?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>Cardeo &#187; circle</title>
	<atom:link href="http://www.cardeo.ca/tag/circle/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cardeo.ca</link>
	<description>Ramblings on web design and social media</description>
	<lastBuildDate>Wed, 26 Oct 2011 17:58:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How To Create Circles With CSS3 and No Images</title>
		<link>http://www.cardeo.ca/2010/how-to-create-circles-with-css3-and-no-images</link>
		<comments>http://www.cardeo.ca/2010/how-to-create-circles-with-css3-and-no-images#comments</comments>
		<pubDate>Mon, 08 Feb 2010 20:52:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[border-radius]]></category>
		<category><![CDATA[circle]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://www.cardeo.ca/?p=2463</guid>
		<description><![CDATA[Thanks to CSS3 it&#8217;s now possible to create circles with only code. Look ma, no images! In the following post, I&#8217;ll show you how to create full, half and quarter circles using only CSS. Unfortunately, the half and quarter circles only work in Firefox at this time. The trick to creating the circles, is the [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to CSS3 it&#8217;s now possible to create circles with only code. Look ma, no images! In the following post, I&#8217;ll show you how to create full, half and quarter circles using only CSS. Unfortunately, the half and quarter circles only work in Firefox at this time. The trick to creating the circles, is the use of the <strong>border-radius</strong> selector.<br />
<span id="more-2463"></span></p>
<h4>Coding a full circle</h4>
<p>Below are the styles for creating a full circle. Underneath the code you&#8217;ll see the circle that these styles will output. To create the circle simply assign the same <strong>height</strong> and <strong>width</strong> value to your class. Set the <strong>border-radius</strong> to half of the <strong>height</strong> and <strong>width</strong> value.</p>
<pre class="highlight">
.full-circle {
 background-color: #c06;
 height: 150px;
 -moz-border-radius:75px;
 -webkit-border-radius: 75px;
 width: 150px;
}
</pre>
<div style="width:150px;">
<p style="background-color:#c06;height:150px;width150px;-webkit-border-radius:75px;-moz-border-radius:75px;"></p>
</div>
<h4>Coding a full circle with a stroke</h4>
<p>Now that we have coded our circle, we can apply some different types of fills. If you&#8217;d like to add a stroke to your circle, it&#8217;s as easy as adding a <strong>border</strong> selector to our CSS. I&#8217;d recommend keeping your border width no bigger than 3px. The rendering of the stroke looks odd any thicker to that due to how the browser renders it. </p>
<pre class="highlight">
.full-circle {
 background-color: #c06;
 <strong>border: 3px solid #333;</strong>
 height: 150px;
 -moz-border-radius:75px;
 -webkit-border-radius: 75px;
 width: 150px;
}
</pre>
<div style="width:150px;">
<p style="border: 3px solid #333;background-color:#c06;height:150px;width150px;-webkit-border-radius:75px;-moz-border-radius:75px;"></p>
</div>
<h4>Using opacity to make your circle fill transparent</h4>
<p>If you&#8217;d like to subtract out your fill and only display the stroke, you can so by using some CSS3 transparency. Using the <strong>background-color</strong> selector, we can set a value using the RGB color mode. The first three numbers refer to R G B, and the final number is how you control the opacity. Setting it to 0 will make the fill transparent, 1 will set it to 100%, 0.5 will set it to 50%, etc&#8230;</p>
<pre class="highlight">
.full-circle {
 <strong>background-color: rgba(204, 0, 102, 0);</strong>
 border: 3px solid #333;
 height: 150px;
 -moz-border-radius:75px;
 -webkit-border-radius: 75px;
 width: 150px;
}
</pre>
<div style="width:150px;">
<p style="background-color: rgba(204, 0, 102, 0);border: 3px solid #333;height:150px;width150px;-webkit-border-radius:75px;-moz-border-radius:75px;"></p>
</div>
<h4>Coding half of a circle</h4>
<p>Remember this only works in Firefox. Coding a half circle is just as easy as the full one. We just need to tweak the <strong>border-radius</strong> selector to only show half the circle. You&#8217;re also going to need to divide the <strong>width</strong> in half since we are only showing half the circle.</p>
<pre class="highlight">
.half-circle {
 background-color: #c06;
 height: 150px;
 <strong>-moz-border-radius: 150px 0 0 150px;
 width: 75px;</strong>
}
</pre>
<div style="width:75px;">
<p style="background-color:#c06;height:150px;width:75px;-moz-border-radius:150px 0 0 150px;"></p>
</div>
<h4>Coding the quarter of a circle</h4>
<p>Once again, this only works in Firefox. Change you <strong>width</strong> back to 150px. Set the top-left <strong>border-radius</strong> value to 150px and everything else to 0.</p>
<pre class="highlight">
.quarter-circle {
 background-color: #c06;
 height: 150px;
 <strong>-moz-border-radius: 150px 0 0 0;
 width: 150px;</strong>
}
</pre>
<div style="width:150px;">
<p style="background-color:#c06;height:150px;width:150px;-moz-border-radius:150px 0 0 0;"></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.cardeo.ca/2010/how-to-create-circles-with-css3-and-no-images/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

