<?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>naioo.com - Design // Dev // Inspiration &#187; css3</title>
	<atom:link href="http://naioo.com/blog/tag/css3/feed/" rel="self" type="application/rss+xml" />
	<link>http://naioo.com/blog</link>
	<description>Graphic Design, Web Development &#38; Inspiration</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:27:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CSS3 Buttons Without Any Images</title>
		<link>http://naioo.com/blog/css3-buttons-without-any-images/</link>
		<comments>http://naioo.com/blog/css3-buttons-without-any-images/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 10:03:56 +0000</pubDate>
		<dc:creator>Henning</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[imageless]]></category>

		<guid isPermaLink="false">http://naioo.com/blog/?p=82</guid>
		<description><![CDATA[In a previous post, I talked about creating dynamic and scaleable buttons using CSS3. While we can use &#8220;border-radius&#8221; for rounded corners and &#8220;box-shadow&#8221; for a nice dropshadow effect, there&#8217;s still a problem with giving the button a 3d / plastic look without using images. In my previous example I used a small PNG image (with [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous post, I talked about <a href="http://naioo.com/blog/creating-dynamic-buttons-with-css3/">creating dynamic and scaleable buttons using CSS3</a>. While we can use &#8220;<strong>border-radius</strong>&#8221; for rounded corners and &#8220;<strong>box-shadow</strong>&#8221; for a nice dropshadow effect, there&#8217;s still a problem with giving the button a 3d / plastic look without using images. In my previous example I used a small PNG image (with a gradient from white to transparent) as a background to achieve that effect.</p>
<p><img class="alignnone size-full wp-image-84" title="CSS Buttons Without Images" src="http://naioo.com/blog/wp-content/uploads/2010/02/css3-buttons-no-images.png" alt="CSS Buttons Without Images" width="558" height="186" /></p>
<p>Now, with the release of Firefox 3.6 (Safari / Webkit supported that a bit earlier) we don&#8217;t need any images at all, thanks to the &#8220;<strong>moz-linear-gradient</strong>&#8221; / &#8220;<strong>webkit-gradient</strong>&#8221; property.</p>
<p><span id="more-82"></span></p>
<p>In detail, the buttons use the same code <a href="http://naioo.com/blog/creating-dynamic-buttons-with-css3/">as the buttons from my last example.</a> The only thing we have to change is the background attribute. Instead of using an image, we now add a CSS generated gradient, that gives our button a more plastic look. This is done by using &#8220;<strong>moz-linear-gradient</strong>&#8221; respectively &#8220;<strong>webkit-gradient</strong>&#8221; for Webkit based browsers. For our buttons, it looks like this:</p>
<pre>background:-webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,1)),to(rgba(185,185,185,1)));
background:-moz-linear-gradient(top,rgba(255,255,255,1),rgba(185,185,185,1));</pre>
<p>This draws a linear gradient from white at the top to a light grey at the bottom. Instead of using the RGBa color values you could also use #Hex codes, as we don&#8217;t need any transparency here.</p>
<p><a href="http://files.naioo.com/imageless-css-buttons" target="_blank"><img class="alignnone size-full wp-image-86" title="CSS Buttons Without Images" src="http://naioo.com/blog/wp-content/uploads/2010/02/css3-buttons-no-images-example.png" alt="CSS Buttons Without Images" width="558" height="229" /></a></p>
<p>In addition to the previous example I also added an &#8220;active / focus&#8221; state to the CSS in order to make it feel more like a real button people are used to.</p>
<p><strong><a href="http://files.naioo.com/imageless-css-buttons" target="_blank">Click here to view the full source code and a live demo.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://naioo.com/blog/css3-buttons-without-any-images/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Creating Dynamic Buttons With CSS3</title>
		<link>http://naioo.com/blog/creating-dynamic-buttons-with-css3/</link>
		<comments>http://naioo.com/blog/creating-dynamic-buttons-with-css3/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 19:07:19 +0000</pubDate>
		<dc:creator>Henning</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://naioo.com/blog/?p=35</guid>
		<description><![CDATA[Creating buttons with CSS becomes a lot more comfortable. The following example demonstrates how to create nice looking, dynamic buttons that are fully scaleable using the new CSS3 properties border-radius, box-shadow and RGBa. Update! This example uses a small background gradient image to achieve the plastic look of the button. Click here for an updated [...]]]></description>
			<content:encoded><![CDATA[<p>Creating buttons with CSS becomes a lot more comfortable. The following example demonstrates how to create nice looking, dynamic buttons that are fully scaleable using the new CSS3 properties <strong>border-radius</strong>, <strong>box-shadow</strong> and <strong>RGBa</strong>.</p>
<p><img class="alignnone size-full wp-image-45" title="CSS-Buttons" src="http://naioo.com/blog/wp-content/uploads/2010/01/css-buttons.jpg" alt="CSS-Buttons" width="558" height="90" /></p>
<p><span id="more-35"></span></p>
<h2>Update!</h2>
<p>This example uses a small background gradient image to achieve the plastic look of the button. <a title="CSS3 buttons without images" href="http://naioo.com/blog/css3-buttons-without-any-images/">Click here for an updated version of the CSS buttons without any images at all.</a></p>
<h2>The main CSS markup</h2>
<pre>.btn {
	display: inline-block;
	background: url(btn.bg.png) repeat-x 0px 0px;
	padding:5px 10px 6px 10px;
	font-weight:bold;
	text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
	border:1px solid rgba(0,0,0,0.4);
	-moz-border-radius: 5px;
	-moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
	-webkit-border-radius: 5px;
	-webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
}</pre>
<p>By using RGBa color values, the button and text shadows always blend well with any color we&#8217;ll add to our button later on. No matter if we want the button to be green, red or blue. The code above always stays the same.</p>
<p><img class="alignnone size-full wp-image-60" title="CSS3-Buttons" src="http://naioo.com/blog/wp-content/uploads/2010/01/css-buttons-colors.jpg" alt="CSS3-Buttons" width="558" height="90" /></p>
<p>Using the common hex-values, we would get a result similar to the one on the right when hovering the button.</p>
<h2>Adding the color</h2>
<pre>.blue		{background-color: #CCCCCC; color: #141414;}
.blue:hover	{background-color: #00c0ff; color: #ffffff;}

.green		{background-color: #CCCCCC; color: #141414;}
.green:hover	{background-color: #8aff00; color: #ffffff;}

.red		{background-color: #CCCCCC; color: #141414;}
.red:hover	{background-color: #ff004e; color: #ffffff;}</pre>
<p>This is where we define the different color variations. All we need to change is the text- and background color along with the mouseover/hover values. To change the color of a button, just attach the corresponding class to the main button class.</p>
<p><a href="http://files.naioo.com/css3-buttons/creating-dynamic-buttons-with-css3.html" target="_blank">Click here for a live demo.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://naioo.com/blog/creating-dynamic-buttons-with-css3/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
	</channel>
</rss>

