<?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; tooltip</title>
	<atom:link href="http://oncemade.com/tag/tooltip/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>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>
	</channel>
</rss>
