<?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/tag/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>
		<item>
		<title>The CSS Image Button &#8211; How To Make a Rollover</title>
		<link>http://www.designbash.com/tutorials/the-css-image-button-how-to-make-a-rollover/</link>
		<comments>http://www.designbash.com/tutorials/the-css-image-button-how-to-make-a-rollover/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:24:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=193</guid>
		<description><![CDATA[Today we will be talking about CSS image buttons, something that every web developer absolutely needs to know and understand. Thankfully, these buttons are really easy to create and only require a few lines of CSS.]]></description>
			<content:encoded><![CDATA[<p>Today we will be talking about <strong>CSS image buttons</strong>, something that every web developer needs to know and understand. It&#8217;s really amazing how much of a difference a simple button can make on your conversion rate. In fact, I came across this comprehensive post that deals with that particular subject, <a href="http://www.jonnyhardwick.com/archives/2009/09/06/7-elements-of-a-high-converting-order-button/">check it out</a>. This post won&#8217;t focus so much on the particulars of a high-converting button, but it will teach you how to slap together a quick CSS button that uses an image as a background.<span id="more-193"></span></p>
<h3>Step 1 &#8211; Make or Find a Button</h3>
<p>For this tutorial I&#8217;ll be using my <a href="http://www.designbash.com/freebies/some-green-buttons/" target="_blank">green glossy buttons</a> from a previous freebie post. Feel free to download the source PSD and follow along, or just make your own button style.</p>
<h3>Step 2 &#8211; Prepare the Button</h3>
<p>Before we really get started, it&#8217;s important to know what size we want to make our button. For this example I&#8217;ll create a button that is quite large, I&#8217;m thinking around <strong>300px by 60px</strong> in size. So go ahead and crate a new Photoshop document with the dimensions you want.</p>
<p><img class="aligncenter size-full wp-image-194" title="css-button-tut1" src="http://www.designbash.com/wp-content/uploads/2010/01/css-button-tut1.jpg" alt="" width="500" height="250" /></p>
<p>After you&#8217;ve created the document, import my button (or yours) and scale it up so that it fills almost the entire document. If you have a little extra space on the sides it&#8217;s not the end of the world, just make sure that your button is perfectly centred on the canvas. To centre somthing perfectly you just need to:</p>
<ol>
<li>With your button folder/layer selected, use the marquee tool (<em>m-key</em>)  to select the entire canvas (<em>apple-a</em>)</li>
<li>Without deselecting anything, choose the Move tool (<em>v-key</em>) and use the alignment tools in the top panel to centre your button vertically and horizontally.</li>
</ol>
<p><br class="spacer_" /></p>
<p><img class="aligncenter size-full wp-image-195" title="css-alignment-tools" src="http://www.designbash.com/wp-content/uploads/2010/01/css-alignment-tools.jpg" alt="" width="500" height="250" /></p>
<p><br class="spacer_" /></p>
<div id="attachment_196" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-196" title="cssbutton2" src="http://www.designbash.com/wp-content/uploads/2010/01/cssbutton2.jpg" alt="" width="500" height="196" /><p class="wp-caption-text">A Perfectly Centred Button</p></div>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<h3>Step 3 &#8211; Create a Rollover State</h3>
<p>Next up we need to create a <strong>rollover state</strong>. Basically, we need to <strong>double our canvas size (vertically) and duplicate our button. </strong>From the top menu select <strong>Image &gt; Canvas Size&#8230; </strong>and double the height of your canvas (120px if you&#8217;re following my example). Once your canvas size is doubled, divide it vertically with a horizontal guide.</p>
<p><img class="aligncenter size-full wp-image-200" title="css-button-double" src="http://www.designbash.com/wp-content/uploads/2010/01/css-button-double.png" alt="" width="479" height="345" /></p>
<p><img class="aligncenter size-full wp-image-201" title="doublebutton" src="http://www.designbash.com/wp-content/uploads/2010/01/doublebutton.jpg" alt="" width="500" height="250" /></p>
<p>Now you need to duplicate your button and centre it perfectly in the top section. The top button will be what our button looks like when you rollover, for now it looks the same as the bottom.</p>
<p><img class="aligncenter size-full wp-image-204" title="rollover-top01" src="http://www.designbash.com/wp-content/uploads/2010/01/rollover-top011.jpg" alt="" width="500" height="215" /></p>
<p>Next we add a rollover effect. If you&#8217;re using my buttons, you can open up the layer styles of the top button and slide the <strong>inner glow up to 75%</strong>. This will give our button a subtle glow effect when we hover over it.</p>
<p><img class="aligncenter size-full wp-image-205" title="effects" src="http://www.designbash.com/wp-content/uploads/2010/01/effects.jpg" alt="" width="500" height="250" /></p>
<p><img class="aligncenter size-full wp-image-207" title="effect-example" src="http://www.designbash.com/wp-content/uploads/2010/01/effect-example.jpg" alt="" width="500" height="201" /></p>
<p>With your button and rollover effect ready to go, you can now &#8220;<strong>save for web</strong>.&#8221; One important thing to consider here is what your background will be like. For my example I&#8217;ve made the background transparent and s<strong>aved my buttons in PNG format</strong>. This means my buttons are not supported in IE6, but you could just as easily choose a background color and ditch the transparency, making your buttons IE6 friendly.</p>
<h3>Step 4 &#8211; CSS Sprites and Some Basic HTML</h3>
<p>Now comes the fun part, creating the button. First, we&#8217;ll start with some markup, a simple and humble link:</p>
<pre class="brush:html"> &lt;a href="#" class="button"&gt;My Glossy Button&lt;/a&gt; </pre>
<p>I&#8217;ve given this link a class so that I can target it easier, but other than that it&#8217;s just a plain old link. Moving on let&#8217;s do some CSS magic. The basic idea is that we hide the link text using the text-indent property and give the link a background-image that only shows the non-rollover state. On hover we simply shift the background to show hover state, avoiding any loading time that is typical of CSS/Javascript image swaps.</p>
<pre class="brush:css">a.button {
display: block;
width: 300px;
height: 60px;
text-indent: -999em;
background: url(css-glossy-rollover.png) 0px -60px no-repeat;
}

a.button:hover {
background-position: 0px 0px;
}</pre>
<p>If you&#8217;ve done everything right the button should look something like this:</p>
<style type="text/css">
a.button {
display: block;
width: 300px;
height: 60px;
text-indent: -999em;
background: url(http://www.designbash.com/wp-content/uploads/2010/01/css-glossy-rollover.png) 0px -60px no-repeat;
}
a.button:hover {
background-position: 0px 0px;
}
</style>
<p><a href="#" class="button">My Glossy Button</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/tutorials/the-css-image-button-how-to-make-a-rollover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Textarea Style &#8211; Quick n&#8217; Easy</title>
		<link>http://www.designbash.com/tutorials/css-textarea-style-quick-n-easy/</link>
		<comments>http://www.designbash.com/tutorials/css-textarea-style-quick-n-easy/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 14:13:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML Email]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=79</guid>
		<description><![CDATA[I'm not sure why, but so many sites seem to ignore their horrible CSS textarea style. How many times have you used a textarea that had zero padding?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure why, but so many sites seem to ignore their <strong>horrible CSS textarea style</strong>. How many times have you used a textarea that had zero padding? or even worse, it used the default &#8220;Times New Roman&#8221; font because the designer was too lazy too fix it?</p>
<p><span id="more-79"></span></p>
<p>Well this article is going to be a quick example of a nice textarea styled with CSS. There is no reason why this should be hard to do, as it literally takes 2 minutes to put together.</p>
<p>Let&#8217;s get started. First we have our textarea:</p>
<pre class="brush:html">

<textarea id="commentBox"></textarea>
</pre>
<p>Just a couple things to note here&#8230; First off, try and make sure there are no extra spaces between the start of the textarea tag and the end. In my experiences having any space will sometimes cause the textarea to be pre-filled with spaces, which is both annoying and confusing when you&#8217;re trying to fill out a form. Second, you almost always want to give your textarea an id, you&#8217;ll need it to target with the label.</p>
<p>Next up some CSS styles:</p>
<pre class="brush:css">
#commentBox {
     display: block;
     width: 400px;
     height: 120px;
     padding: 8px;
     border: 1px solid #cccccc;
     line-height: 130%;
     font-size: 13px;
}
</pre>
<p>What we end up with is a nice standard textarea that can be customized to fit whatever theme you need. It should look like the example textarea below:</p>
<style type="text/css">
#commentBoxExample {
     width: 400px;
     height: 120px;
     display: block;
     padding: 8px;
     border: 1px solid #cccccc;
     line-height: 130%;
     font-size: 13px;
     margin: 0 auto;
} 
#textareaHolder {
     padding: 15px;
     background: #efefef;
     border: 1px solid #cccccc;
}
</style>
<div id="textareaHolder"><textarea id="commentBoxExample">This is just an example and only an example&#8230;</textarea></div>
<p>So thats it! Only 7-10 lines of CSS for a basic but nice looking textarea. From here it would be really easy to customize this with background-images, fancy borders, different colors, jQuery hover states, or whatever else you think would look nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/tutorials/css-textarea-style-quick-n-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Link Style &#8211; A Quick Look</title>
		<link>http://www.designbash.com/inspiration/css-link-style-a-quick-look/</link>
		<comments>http://www.designbash.com/inspiration/css-link-style-a-quick-look/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 02:42:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Polls]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=55</guid>
		<description><![CDATA[Without links the internet would be nothing. It's quite literally the fabric that holds the net together. So I thought I would write this quick post with the idea of looking at some various link styles.]]></description>
			<content:encoded><![CDATA[<p>Without links the internet would be nothing. It&#8217;s quite literally the fabric that holds the net together. So I thought I would write this quick post with the idea of looking at some various <strong>link styles</strong>. I often find myself looking to others for inspiration, especially when it comes to link styling. For some reason I&#8217;ve always had a hard time coming up with different styles and I always seem to end up with a really boring look. So here are some various link styles that I&#8217;ve found scattered around the internet&#8230;</p>
<p><span id="more-55"></span></p>
<h3><a href="http://www.smashingmagazine.com/" target="_blank">Smashing Magazine</a> Footer Links</h3>
<div id="attachment_56" class="wp-caption aligncenter" style="width: 564px"><a href="http://www.smashingmagazine.com/"><img class="size-full wp-image-56 " title="smashing-magazine-link-style" src="http://www.designbash.com/wp-content/uploads/2010/01/smashing-magazine-link-style.png" alt="Smashing Magazine Link Style" width="554" height="177" /></a><p class="wp-caption-text">Taken from the footer of Smashing Magazine</p></div>
<p><a href="http://www.smashingmagazine.com/">Smashing Magazine&#8217;s current site</a> (<em>Jan 2010</em>) has some really classic links located in the footer. They are clean, subdued, and are missing their text-decoration (<em>the underline</em>).</p>
<h3><a href="http://www.nettuts.com" target="_blank">Nettuts</a> and the Block Link</h3>
<p><a href="http://www.nettuts.com"><img class="alignleft size-full wp-image-59" title="nettuts-block-links" src="http://www.designbash.com/wp-content/uploads/2010/01/nettuts-block-links.png" alt="Nettuts Block Links" width="188" height="124" /></a> Looking at another footer, we can see an example of some stylish block links. I initially did not enjoy these links, but for some reason they&#8217;ve really grown on me over the last few months. I&#8217;ve even come to enjoy how they are all different widths, something that I would have hated in my earlier days.</p>
<div style="clear: both;">&nbsp;</div>
<h3>The <a href="http://www.happycog.com">Happy Cog</a> Header</h3>
<p style="text-align: center;"><a href="http://www.happycog.com"><img class="aligncenter size-full wp-image-62" title="happy-cog-link-style" src="http://www.designbash.com/wp-content/uploads/2010/01/happy-cog-link-style.png" alt="Header Links Styles" width="466" height="101" /></a></p>
<p style="text-align: left;">One of my favorite sites, so I couldn&#8217;t leave them out. <a href="http://www.happycog.com" target="_blank">Happy Cog</a> uses the traditional underlined link in their main navigation, with a block link hover effect. While it seems that underlines have become less popular lately, I think they provide users with instant recognizable links.</p>
<h3 style="text-align: left;"><a href="http://www.alistapart.com" target="_blank">A List Apart</a> General Links</h3>
<p style="text-align: left;"><a href="http://www.alistapart.com"><img class="aligncenter size-full wp-image-69" title="a-list-apart-links" src="http://www.designbash.com/wp-content/uploads/2010/01/a-list-apart-links.png" alt="List Apart Links" width="506" height="139" /></a></p>
<p style="text-align: left;">I wanted to throw this in here because I really enjoy the hover effect on <a href="http://www.alistapart.com" target="_blank">A List Apart</a>. They use a background color AND an underline.</p>
<p style="text-align: left;">Anyways, I&#8217;ll be adding to this list as I find more interesting links. I know it&#8217;s a little trivial, but things like this are the bread and butter of a well crafted site. In the meantime, answer this scientific poll:</p>
<p style="text-align: left;">[poll id="2"]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/inspiration/css-link-style-a-quick-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
