<?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>Oncemade &#187; CSS</title>
	<atom:link href="http://oncemade.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://oncemade.com</link>
	<description>Design, Web Dev, Inspiration</description>
	<lastBuildDate>Fri, 09 Jul 2010 02:06:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Resize Textarea in Webkit</title>
		<link>http://oncemade.com/resize-textarea-in-webkit/</link>
		<comments>http://oncemade.com/resize-textarea-in-webkit/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 02:06:26 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=976</guid>
		<description><![CDATA[You've probably noticed by now that webkit browsers have a handler to resize textareas. That said, you can control it [...]]]></description>
			<content:encoded><![CDATA[<p>You've probably noticed by now that webkit browsers have a handler to resize textareas. That said, you can control it with one line of <abbr title="Cascading Style Sheets">CSS</abbr>.</p>

<pre><code><h4>Disable resize</h4>textarea {
  resize: none;
}</code></pre>

<pre><code><h4>Vertical resize only</h4>textarea {
  resize: vertical;
}</code></pre>

<pre><code><h4>Horizontal resize only</h4>textarea {
  resize: horizontal;
}</code></pre>

<p>Check theses demo showing all possible options</p>
<div class="example">
	<textarea rows="8" cols="40">Default Resize</textarea><br />
	<textarea class="noResize" rows="8" cols="40">No Resize</textarea><br />
	<textarea class="vertResize" rows="8" cols="40">Vertical Resize</textarea><br />
	<textarea class="horzResize" rows="8" cols="40">Horizontal Resize</textarea>
</div>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/resize-textarea-in-webkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice input labels using jQuery and CSS</title>
		<link>http://oncemade.com/nice-input-labels/</link>
		<comments>http://oncemade.com/nice-input-labels/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 19:41:01 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[label]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=936</guid>
		<description><![CDATA[Nowadays it's very common to find websites "hiding" form labels in favor of input's default text. Even tough it's a [...]]]></description>
			<content:encoded><![CDATA[<p>Nowadays it's very common to find websites "hiding" form labels in favor of input's default text. Even tough it's a cleaver idea, there is a better way to accomplish the same result without compromising accessibility.</p>

<p>First step is to create the form. I usually have all my forms inside a list:</p>
<p><strong>UPDATE: It's necessary to turn off the "autocomplete" so the inputs don't get messed up.</strong></p>
<pre>
<h4>markup</h4><code>&lt;form action=""&gt;
  &lt;ul&gt;
   &lt;li&gt;
    &lt;label for="username"&gt;Username&lt;/label&gt;
    &lt;input id="username" type="text" autocomplete="off" /&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;label for="password"&gt;Password&lt;/label&gt;
    &lt;input id="password" type="password" autocomplete="off" /&gt;
   &lt;/li&gt;
   &lt;li&gt;
    &lt;input type="submit" value="login" /&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
&lt;/form&gt;</code></pre>
<p>Don't forget the <strong>"for"</strong> attribute, the script will rely on it. Go ahead and add the following CSS:</p>
<pre><h4>CSS</h4><code>form li { position: relative; }
label {
  position: absolute;
  top: 5px; // adjust as needed
  left: 5px;
}
//remove absolute position if the label comes after
//the input. Eg. a checkbox with a text next to it
input + label { position: static; }</code></pre>
<span id="more-936"></span>

<p>Now the final touch. With some jQuery magic, lets make the label disappear on focus.</p>
<pre><h4>jQuery</h4>
<code>//loop through all text inputs, password inputs and textarea
var inputs = $('input[type="text"], textarea, input[type="password"]');

// remove label on focus
inputs.focus(function(){
  $('label[for="'+$(this).attr('id')+'"]').hide();
});
inputs.blur(function(){
  var that = $(this);
  if (that.val() == ""){
    $('label[for="'+that.attr('id')+'"]').show();
  }
});
inputs.blur();</code></pre>
<h4>Demo</h4>
<div id="example"><form>
<ul>
	<li> <label for="username">Username</label>

<input id="username" type="text" autocomplete="off" /></li>
	<li> <label for="password">Password</label>

<input id="password" type="password" autocomplete="off" /></li>
	<li> <input type="submit" value="Login" /></li>
</ul>
</form></div>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/nice-input-labels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Tooltip</title>
		<link>http://oncemade.com/css-tooltip/</link>
		<comments>http://oncemade.com/css-tooltip/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 07:56:23 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[progressive enrichment]]></category>
		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=895</guid>
		<description><![CDATA[Here is how to create a very basic tooltip using only CSS. I've been using this technique all over my [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how to create a very basic tooltip using only CSS. I've been using this technique all over my latest project.</p>
<p>Let's start by creating the following markup:</p>

<pre><h4>Markup</h4><code>&lt;a href=&quot;http://www.example.com&quot; class=&quot;tooltip&quot;&gt;
 My Link 
 &lt;span&gt;Cool tooltip&lt;small&gt;&lt;/small&gt;&lt;/span&gt;
&lt;/a&gt;</code>
</pre>
<pre><h4>CSS</h4><code>.tooltip { position: relative; }
.tooltip span {
  position: absolute;
  right: 0;
  top: -35px;
  display: none;
  min-width: 50px;
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 11px;
  text-align: center;
  background-color: rgba(0,0,0,.8);
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
}
.tooltip span small {
  position: absolute;
  right: 10px;
  bottom: -6px;
  border-top: 6px solid rgba(0,0,0,.8);
  border-left: 6px solid transparent;
}
.tooltip:hover span { display: block; }</code>
</pre>

<p><a href="http://oncemade.com/the-right-way-to-declare-rgba-colors/" title="The Right Way to Declare RGBa Colors | Oncemade">As I mentioned in a previous article</a>, <abbr title="Internet Explorer">IE</abbr> doesn't support RGBa. Adding the following styles, wrapped in a conditional comment, will make it work.</p>

<pre><h4>IE CSS</h4><code>.tooltip span { background-color: #000; }
.tooltip span small { border-top: 6px solid #000; }</code>
<h4>IE 6 Tooltip Arrow Fix</h4><code>*html .tooltip span small { 
  border-left: 6px solid #363636; /* Match the color of the background */
} </code>
</pre>

<p>For more info about creating speech bubble using only CSS, go to <a href="http://desandro.com/resources/css-speech-bubble-icon" title="David DeSandro: CSS Speech Bubble Icon">DeSandro's tutorial on creating speech bubble.</a></p>

<h3>Demo</h3>
<p>
	<a href="#" class="tooltip">My Link <span>Cool Tooltip<small></small></span></a><br />
	<a href="#" class="tooltip">Long Tip Test <span>Very Long Tooltip Test Very Long Tooltip Test<small></small></span></a>
</p>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/css-tooltip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding hasJS Class When JavaScript Is Available</title>
		<link>http://oncemade.com/adding-hasjs-class-when-javascript-is-available/</link>
		<comments>http://oncemade.com/adding-hasjs-class-when-javascript-is-available/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 05:01:10 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[progressive enhancement]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=781</guid>
		<description><![CDATA[While at An Event Apart Boston, Jeremy Keith delivered the best lecture of the conference, about progressive enhancement. One slide [...]]]></description>
			<content:encoded><![CDATA[<p>While at <a href="http://www.aneventapart.com/2009/boston/" title="An Event Apart Boston 2009">An Event Apart Boston</a>, <a href="http://adactio.com/" title="Adactio: Jeremy Keith">Jeremy Keith</a> delivered the best lecture of the conference, about progressive enhancement. One slide caught my attention the most. It was about adding a class to the body if JavaScript was available. Here is his code example using jQuery:</p>
<pre><h4>Keith's Example using jQuery:</h4><code>jQuery(function($) {
$(&#x27;body&#x27;).addClass(&#x27;hasJS&#x27;);
});</code>

<h4>CSS</h4><code>.hasJS .module {
display: none;
}</code>
</pre>
<h5>Why add a class if JavaScript is enabled?</h5>
<p>Although the majority of desktop users have JavaScript enabled, mobile is one of the most used platforms to surf the web. Some mobile browsers don't support JavaScript. Keep in mind that search engines don't run JavaScript, so NEVER add important content using JavaScript.</p>
<span id="more-781"></span>
<p>My current project at work requires the content to be rendered for both enabled and disabled JavaScript browsers. I did a bit of research and found that most websites/solutions add the <em>hasJS</em> class to the body after the <abrr title="Document Object Module"><em>DOM</em></abrr> is loaded. My first thought was, if the class gets added after the <em>DOM</em> is loaded, a shift on the page will occur providing a bad user experience. Yahoo was a site I researched and they have, IMHO, the cleverest solution of them all. They add the class to the <em>HTML</em> element instead of the <em>BODY</em> element. The first script block on the page to be loaded adds the <em>hasJS</em> class without dependency on libraries. <strong>Note: Yahoo uses another class name "jsenabled"</strong>.</p>
<p class="aligncenter"><img src="http://oncemade.com/wp-content/uploads/2009/08/yahoo_firebug.png" alt="Yahoo Firebug" /></p>
<p>You might be asking why add the class to the <em>HTML</em> element? I think it makes more sense because the <em>BODY</em> is the beginning of the content. This means that everything after the body is "visible" to the user and blocking the content with a script tag isn't a good optimization practice. Here is the code to add the <em>hasJS</em>  class to the body:</p>
<pre><h4>hasJS Script Block</h4><code>&lt;script type=&quot;text/javascript&quot;&gt;
  document.getElementsByTagName(&#x27;html&#x27;)[0].className = &#x27;hasJS&#x27;;
&lt;/script&gt;
</code></pre>
<p class="note">NOTE: If you already have more classes on the HTML element, use <strong>  document.getElementsByTagName(&#x27;html&#x27;)[0].className += &#x27; hasJS&#x27;;</strong> instead.</p>

<a target="_blank" class="demoBtn" href="http://examples.oncemade.com/hasjs.html">Demo</a>

<div class="browserSupport">
<h4>Browser Support</h4>
<ul class="browserComp clearfix">
   <li class="firefoxComp"><span>Firefox</span></li>
   <li class="safariComp"><span>Safari</span></li>
   <li class="chromeComp"><span>Chrome</span></li>
   <li class="operaComp"><span>Opera</span></li>
   <li class="ie7Comp"><span>Internet Explore 7 &amp; 8</span></li>
<li class="ie6Comp"><span>Internet Explore 6</span></li>
</ul>
</div>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/adding-hasjs-class-when-javascript-is-available/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Rounded Corners via CSS &#8211; almost there!</title>
		<link>http://oncemade.com/rounded-corners-via-css-almost-there/</link>
		<comments>http://oncemade.com/rounded-corners-via-css-almost-there/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 14:07:35 +0000</pubDate>
		<dc:creator>Steven Tate</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Rounded Corners]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=796</guid>
		<description><![CDATA[Can everyone feel how square the IE world is about to become? We have recently began the effort of killing [...]]]></description>
			<content:encoded><![CDATA[<p>Can everyone feel how square the IE world is about to become?  We have recently began the effort of killing the rounded corner graphics and even sillier solutions such as Nifty Cube in favor of the progressive CSS rounded corner tags.</p>

<pre><h4>CSS</h4><code>-webkit-border-radius
-moz-border-radius</code>
</pre>

<p>It's a tough decision to start dramatically forking the experience between IE and &ldquo;the rest of the world.&rdquo;  But, before you get overly excited, note the border-radius has it&#x27;s gotchas!</p>
<span id="more-796"></span>
<p>
<ol>
	<li>
		<h4><del datetime="2009-08-21T01:48:41+00:00">FF 3.0 doesn't support individual corners</del> <strong>Corrected - thanks Brainlag</strong></h4>
		<p><del datetime="2009-08-21T01:48:41+00:00">Yep, I'd really recommend squaring the diminishing world of FF3.0 as well.</del> By all means, ROUND EM IN FF3.0!  This can be done by targeting FF3.0 and above with @media queries.  <del datetime="2009-08-21T01:48:41+00:00">This will require a constraint since @media partially worked in FF3.0</del>.  So, try <del datetime="2009-08-21T01:48:41+00:00">@media (min-width: 1px;) {  }</del> <strong>corrected</strong>: @media screen { #myDiv { -moz-border-radius: 5px; } }</p>
	</li>
	<li>
		<h4>Background images spill out of rounded boxes in FF3.0</h4>
		<p>I believe FF3.5 properly masks background images finally</p>
	</li>
	<li>
		<h4>Rounded corners in FF2.0 aren't anti-aliased</h4>
		<p>This is probably not much of a problem given FF2.0's 3% market share.</p>
	</li>
</ol>
</p>

<p>These quirks are no cause for concern.  In fact, I think you should leave FF3.0 and pre Safari 4.0 out of the rounding world by the fact that older browser FF and Safari users disappear faster than &ldquo;a truckload of dead rats in a tampon factory!&rdquo; - gratuitous, meaningless quote from Top Secret.</p>

<p>What do you guys think?  Any major CSS Rounded Corner converts?</p>
-tateman

<div class="browserSupport">
	<h4>Browser Support</h4>
	<ul class="browserComp clearfix">
		<li class="firefoxComp"><span>Firefox</span></li>
		<li class="safariComp"><span>Safari</span></li>
		<li class="chromeComp"><span>Chrome</span></li>
	</ul>
</div>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/rounded-corners-via-css-almost-there/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Renaming and Extending Easy-Clearing, AKA Clearfix</title>
		<link>http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/</link>
		<comments>http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 04:25:28 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[clearfix]]></category>
		<category><![CDATA[easy-clearing]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=642</guid>
		<description><![CDATA[When positioniseverything.net posted an article about clearfix technique, it didn&#x27;t take much for web developers and designers to start adopting [...]]]></description>
			<content:encoded><![CDATA[<p>When <a href="http://positioniseverything.net">positioniseverything.net</a> posted an article about <a href="http://www.positioniseverything.net/easyclearing.html"><em>clearfix</em></a> technique, it didn&#x27;t take much for web developers and designers to start adopting it. Lately, <a href="http://simplebits.com">Dan Cederholm</a> has been talking about renaming the class <em>clearfix</em> to <em>group</em>, which semantically speaking makes a lot more sense. So, let&#x27;s go ahead and rename the class.</p>
<pre><h4>New Easy-Clearing</h4><code>.group:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}</code></pre>

<p>Using <a href="http://www.quirksmode.org/css/condcom.html">conditional comments</a>, let&#x27;s add the proper code to handle <abbr title="Internet Explore 6">IE 6</abbr> and <abbr title="Internet Explore 7">IE 7</abbr> (<abbr title="Internet Explore 8">IE8</abbr> supports the :after pseudo-elements; no extra code is necessary).</p>
<span id="more-642"></span>
<pre><h4>New Easy-Clearing for IE</h4><code>/* IE6 */
* html .group { height: 1%; }

/*IE7 */
.group { min-height: 1px; }</code></pre>
<p>I&#x27;ve been using the <em>group</em> class on my latest projects and I&#x27;d like to share a small tip, when clearing list items, with you.</p>
<p>Normally, we&#x27;d have the <em>group</em> class on every <em>LI</em>, like so:</p>
<pre><h4>Clearing List Items the Old Way</h4><code>&lt;ul class=&quot;comments&quot;&gt;
  &lt;li class=&quot;group&quot;&gt;
    &lt;img src=&quot;carla.jpg&quot; alt=&quot;Carla&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;Tiny and I miss you&lt;/p&gt;
  &lt;/li&gt;
  &lt;li class=&quot;group&quot;&gt;
    &lt;img src=&quot;steven.jpg&quot; alt=&quot;Steven&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I need a favor! It will take you 5 seconds.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li class=&quot;group&quot;&gt;
    &lt;img src=&quot;buzz.jpg&quot; alt=&quot;Buzz&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I speak gibberish&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;</code></pre>


<!--more-->
<p>Although the markup doesn&#x27;t look very bad, we can make things better by introducing a new class (<em>groupList</em>) and adding it to the <em>UL</em>.</p>
<pre><h4>Clearing List Items the New Way</h4><code>&lt;ul class=&quot;comments groupList&quot;&gt;
  &lt;li&gt;
    &lt;img src=&quot;carla.jpg&quot; alt=&quot;Carla&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;Tiny and I miss you&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;img src=&quot;steven.jpg&quot; alt=&quot;Steven&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I need a favor! It will take you 5 seconds.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;img src=&quot;buzz.jpg&quot; alt=&quot;Buzz&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I speak gibberish&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;</code></pre>

<p>Phew, the markup looks much cleaner! Now that we&#x27;ve fixed it, let&#x27;s add the <em>.groupList > li</em> selector to the existing <em>.group</em> styles.</p>
<pre><h4>Extending .group</h4><code>.groupList > li,
.group:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}</code></pre>

<p>Wait! How about the beloved <abbr title="Internet Explore">IE</abbr>?

<pre><h4>Extending .group IE</h4><code>/* IE6 */
* html .groupList li,
* html .group { height: 1%; }
* html .groupList li li { height: auto; } /* Resets nested LIs */

/*IE7 */
.group > li,
.group { min-height: 1px; }</code></pre>


<p>
<h4>Browser Support</h4>
<ul class  = "browserComp clearfix">
<li class = "firefoxComp"><span>Firefox</span></li>
<li class = "safariComp"><span>Safari</span></li>
<li class = "chromeComp"><span>Chrome</span></li>
<li class = "operaComp"><span>Opera</span></li>
<li class = "ie7Comp"><span>Internet Explore 7 &#038; 8</span></li>
<li class = "ie6Comp"><span>Internet Explore 6</span></li>
</ul>
</p>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>The Right Way to Declare RGBa Colors</title>
		<link>http://oncemade.com/the-right-way-to-declare-rgba-colors/</link>
		<comments>http://oncemade.com/the-right-way-to-declare-rgba-colors/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 06:55:34 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[css 3]]></category>
		<category><![CDATA[progressive enrichment]]></category>
		<category><![CDATA[rgba]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=625</guid>
		<description><![CDATA[The most efficient way to declare RGBa values and don't mess up the CSS. ]]></description>
			<content:encoded><![CDATA[<p>One of the best progressive enrichment that I use on my projects is to set colors as <abbr title="Red, Green, Blue, and Alpha"><em>RGBa</em></abbr> (red, green, blue, alpha) values. As I write this, <abbr title="Red, Green, Blue, and Alpha"><em>RGBa</em></abbr> is current supported in firefox 3.0.5+, Safari 2+, Chrome 1+, and Opera 10+.</p>  <p>The most efficient way that I found to declare <abbr title="Red, Green, Blue, and Alpha"><em>RGBa</em></abbr> values is to separate the flat colors into code block, and keeping <abbr title="Red, Green, Blue, and Alpha"><em>RGBa</em></abbr> with the other styles. Like in this example:</p>  <pre><h4>CSS</h4><code>/* NON RGBa BROWSERS
  ------------------------------------------------------ */
#wrap { background-color: #000; }
#footer,
#header { background-color: #ccc; }
.section { color: #fff; }

/* HEADER
  ------------------------------------------------------ */
#header { background-color: rgba(204,204,204,.8); }
#header ul { float: right; }
#header li {
  float: left;
  margin-left: 1em;
}
#header li:first-child { margin-left: 0; }

/* WRAP
  ------------------------------------------------------ */
#wrap {
  width: 960px;
  margin: 0 auto;
  background-color: (0,0,0,.7);
}
.section {
  padding: 1em;
  color: rgba(255,255,255,.9);
}
</code></pre>
<p>I always keep the flat colors separated because they can be easily removed when the other browsers start supporting <em>RGBa</em>. Why didn't I declare the <em>HEX</em> colors on the same line as the <em>RGBa</em>? Simple! <em>IE</em> doesn't support it; no color will be rendered at all. <strong>Note: Please be aware that the <abbr title="Red, Green, Blue, and Alpha"><em>RGBa</em></abbr> colors have to be the last ones declared.</strong></p>
<span id="more-625"></span>
<pre><h4>DOESN'T WORK IN IE</h4><code>/* HEADER
  ------------------------------------------------------ */
#header {
  background-color: #ccc;
  background-color: rgba(204,204,204,.8);
}</code></pre>
<p>Last but not least, when I use border's shorthand syntax, I declare it with the flat colors first, and then <em>border-color</em> afterward. See the example bellow for better understanding.</p>
<pre><h4>CSS</h4><code>/* NON RGBa BROWSERS
  ------------------------------------------------------ */
#header { border: 1px solid #000; }

/* HEADER
  ------------------------------------------------------ */
#header { border-color: rgba(0,0,0,.7); }
</code></pre>
<div>
Just a few examples of website using <abbr title="Red, Green, Blue, and Alpha"><em>RGBa</em></abbr> colors:
<ul>  <li><a href="http://forabeautifulweb.com/" title="Web design and development training workshops for web designers and developers | For A Beautiful Web">For A Beautiful Web</a> - Crafted by <a href="http://www.stuffandnonsense.co.uk/" title="Stuff and Nonsense | Creative web site design specialists based in North Wales, UK">Andy Clarke</a></li>  <li><a href="http://tweetcc.com/" title="tweetCC | Publish &#038; license tweets with Creative Commons">TweetCC</a> - Crafted by <a href="http://www.stuffandnonsense.co.uk/" title="Stuff and Nonsense | Creative web site design specialists based in North Wales, UK">Andy Clarke</a></li>  <li><a href="http://designertweet.com/" title="Designer Tweet">Designer Tweet</a> - My latest case study website.</li>  <li><a href="http://simplebits.com/" title="SimpleBits">SimpleBits - Crafted by Dan Cederholm</a></li>
</ul>
</div>
<div  class="update">
<h4>Update</h4>
For more information and details about <em>RGBa</em>, please visit the following:
<ul>
<li><a href="http://www.timkadlec.com/post.asp?q=61">Not As Clear As It Seems: CSS3 Opacity and RGBA</a></li>
<li><a href="http://forabeautifulweb.com/blog/about/is_css3_rgba_ready_to_rock/">Is CSS3 RGBa ready to rock? </a></li>
</ul>
</div>
<h4>Browser Support</h4>
<ul class="browserComp clearfix">  <li class="firefoxComp"><span>Firefox 3.0+</span></li>  <li class="safariComp"><span>Safari 3.0+</span></li>  <li class="chromeComp"><span>Chrome 1+</span></li>  <li class="operaComp"><span>Opera 10+</span></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/the-right-way-to-declare-rgba-colors/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Adjacent Sibling Selector Bug in IE7</title>
		<link>http://oncemade.com/adjacent-sibling-selector-bug-ie7/</link>
		<comments>http://oncemade.com/adjacent-sibling-selector-bug-ie7/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 12:00:13 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[adjacent sibling selector]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[ie7]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=574</guid>
		<description><![CDATA[I recently ran into a bug on Internet Explore 7 that was driving me nuts. After hours of debugging, I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a bug on Internet Explore 7 that was driving me nuts. After hours of debugging, I finally found the solution.</p>

<p><abbr title="Internet Explore 7">IE7</abbr> has a bug when using <a href="http://www.w3.org/TR/CSS2/selector.html">adjacent sibling selectors</a>. If there is a comment between two elements, it will think that the comment is the next element. Here is the example:</p>

<pre><h4>CSS</h4><code>p + p { background-color: #fc0; }</code></pre>
<pre><h4>Markup with comment</h4><code>&lt;p&gt;Paragraph #1&lt;/p&gt;
&lt;!-- my comment here --&gt;
&lt;p&gt;Paragraph #2&lt;/p&gt;</code></pre>

<p>The image bellow shows how it supposed to look like in all modern browsers. Unfortunately, the only way to make it work in <abbr title="Internet Explore 7">IE7</abbr> would be by removing the comment.</p>
<p class="aligncenter"><img src="http://examples.oncemade.com/images/adjacentSiblingSelector.png" alt="adjacent sibling selector" /></p>

<pre><h4>Markup without comment to make it work in <abbr title="Internet Explore 7">IE7</abbr></h4><code>&lt;p&gt;Paragraph #1&lt;/p&gt;
&lt;p&gt;Paragraph #2&lt;/p&gt;</code></pre>

]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/adjacent-sibling-selector-bug-ie7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create Date Badge with WordPress and CSS</title>
		<link>http://oncemade.com/create-date-badge-with-wordpress-and-css/</link>
		<comments>http://oncemade.com/create-date-badge-with-wordpress-and-css/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 03:29:03 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Badge]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=510</guid>
		<description><![CDATA[This tutorial will walk you through creating date badges with WordPress and CSS. Let&apos;s start of by adding the necessary [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will walk you through creating date badges with <a href="http://www.wordpress.com" title="WordPress.com">WordPress</a> and <abbr title="Cascading Style Sheets">CSS</abbr>.</p>
<p class="aligncenter"><img src="http://oncemade.com/wp-content/uploads/2009/04/datebadgesample.png" alt="Date Badge Sample" title="Date Badge Sample" width="518" height="180" class="alignnone size-full wp-image-537" /></p>

<p>
  Let&apos;s start of by adding the necessary markup to render the appropriate date format. Create a <em>DIV</em> element with a class of &quot;entryDate&quot; and three children <em>SPANs</em> with respective classes &quot;postMoth&quot;, &quot;postDay&quot;, and &quot;postYear&quot;.<br />
  Add the PHP code to get the post date from the database as shown bellow. For more PHP date format go to <a href="http://us.php.net/date" title="PHP Date Format">http://us.php.net/date</a>
</p>

<pre><h4>Markup</h4><code>&lt;div class=&quot;entryDate&quot;&gt;
   &lt;span class=&quot;postMonth&quot;&gt;&lt;?php the_time(&apos;M&apos;) ?&gt;&lt;/span&gt;
   &lt;span class=&quot;postDay&quot;&gt;&lt;?php the_time(&apos;d&apos;) ?&gt;&lt;/span&gt;
   &lt;span class=&quot;postYear&quot;&gt;&lt;?php the_time(&apos;Y&apos;) ?&gt;&lt;/span&gt;
&lt;/div&gt;</code></pre>

<p>Now let's add styles to make it look pretty.</p>
<span id="more-510"></span>
<p>First of all, set the body <em>font-size</em> to 10px or 62.5%. Then go ahead and set the <em>DIV</em> that wraps the post entry to <em>position: relative</em> so the date badge can be positioned relatively to it. Set <em>margin-left</em> to the width of the date badge plus the gap between the post entry. In this sample the <em>margin-left</em> is set to 4.8em.</p>
<p>Absolute position the <em>entryDate</em> and set the <em>left</em> to the same size as the its parent <em>margin-left</em>. After that, set the width to 3.5em. Next, set all the <em>SPANs</em> inside <em>entryDate</em> as <em>block element</em> (The reason why <em>SPANs</em> are being used instead of <em>DIVs</em> is because if the <em>stylesheet</em> is disabled, the date renders nicely in one line). Don't forget to centered align the text. </p>
<p>Change the appearance as needed, I have changed the size of the text to look more like a calendar and I've set its color to blue and white.</p>


<pre><h4>CSS</h4><code>body { font-size: 62.5%; }
.post { 
    position: relative;
    margin-left: 4.8em;
}
.entryDate { 
    border: 1px solid #999; 
    font-family: Georgia,&quot;Times New Roman&quot;, serif; 
    left: -4.8em; 
    line-height: 1; 
    position: absolute; 
    top: 0; 
    width: 3.5em;
}
.entryDate span { 
    display: block; 
    text-align: center; 
}
.postMonth { 
    text-transform: uppercase; 
    font-size: 1.2em;
    padding-top: 0.3em; 
}
.postDay { font-size: 2em; }
.postYear { 
    background-color: #2358B8; 
    color: #FFF; 
    font-size: 1.2em; 
    padding: 0.3em 0; 
    margin-top: 0.3em;
}

</code></pre>

<p>Don't forget to checkout the live demo</p>

<a href="http://examples.oncemade.com" title="Date Badge Demo" class="demoBtn" target="_blank">Demo</a>

<h4>Browser Support</h4>
<ul class="browserComp clearfix">
   <li class="firefoxComp"><span>Firefox</span></li>
   <li class="safariComp"><span>Safari</span></li>
   <li class="chromeComp"><span>Chrome</span></li>
   <li class="operaComp"><span>Opera</span></li>
   <li class="ie7Comp"><span>Internet Explore 7 &amp; 8</span></li>
<li class="ie6Comp"><span>Internet Explore 6</span></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/create-date-badge-with-wordpress-and-css/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>CSS Tip: Drop Caps</title>
		<link>http://oncemade.com/css-tip-drop-caps/</link>
		<comments>http://oncemade.com/css-tip-drop-caps/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 06:19:58 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Drop Caps]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=246</guid>
		<description><![CDATA[Drop caps are usually used in desktop publishing, the first letter of a paragraph is enlarged to drop down 2 or more lines.]]></description>
			<content:encoded><![CDATA[<p>
Drop caps are usually used in desktop publishing, the first letter of a paragraph is enlarged to drop down 2 or more lines. <strong>Update: To make it work in IE6, the first letter needs to be wrapped in a span. <a href="http://examples.oncemade.com/dropCapsIE6.html">IE6 Example</a></strong>
</p>

<pre><h4>Markup</h4><code>&lt;p class=&quot;drop&quot;&gt;
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
    nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in 
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
&lt;/p&gt;</code></pre>
<pre><h4>CSS</h4><code>.drop:first-letter { 
    font-size: 4.2em;
    float: left;
    line-height: 0.6em;
    margin: 0.13em 0.13em 0.13em 0;
}</code></pre>

<span id="more-246"></span>
<h3>Example</h3>
<p class="drop">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>

<h4>Browser Support</h4>
<ul class="browserComp clearfix">
   <li class="firefoxComp"><span>Firefox</span></li>
   <li class="safariComp"><span>Safari</span></li>
   <li class="chromeComp"><span>Chrome</span></li>
   <li class="operaComp"><span>Opera</span></li>
   <li class="ie7Comp"><span>Internet Explore 7</span></li>	
</ul>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/css-tip-drop-caps/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
