<?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>iBlog random &#187; Web</title>
	<atom:link href="http://blog.zurka.us/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zurka.us</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 02 Aug 2011 17:22:53 +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 Have an Opaque Text on a Transparent Background</title>
		<link>http://blog.zurka.us/how-to-have-an-opaque-text-on-a-transparent-background/</link>
		<comments>http://blog.zurka.us/how-to-have-an-opaque-text-on-a-transparent-background/#comments</comments>
		<pubDate>Fri, 15 May 2009 14:56:17 +0000</pubDate>
		<dc:creator>nasal</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.zurka.us/?p=632</guid>
		<description><![CDATA[This is what I&#8217;m going to show you how to do: This is Kakashi from the Naruto anime. It&#8217;s a nice effect that can be used for many things, for a nice gallery or something. You could combine this with some JS, add a hover effect to the picture and have it display the caption. [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:15px;padding-right:0px;padding-bottom:0px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=iBlog+random&link=http%253A%252F%252Fblog.zurka.us%252Fhow-to-have-an-opaque-text-on-a-transparent-background%252F&title=How+to+Have+an+Opaque+Text+on+a+Transparent+Background&desc=This+is+what+I%27m+going+to+show+you+how+to+do%3A%0D%0A%0D%0A%0D%0A%09%0D%0A%09%09This+is+Kakashi+from+the+Naruto+anime.%0D%0A%09%0D%0A%09%0D%0A%0D%0A%0D%0AIt%27s+a+nice+effect+that+can+be+used+for+many+things%2C+for+a+nice+gallery+or+something.+You+coul&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>This is what I&#8217;m going to show you how to do:</p>
<div style="width: 300px; height: 224px; position: relative;">
<div style="position: absolute; bottom: 0px; _bottom: 4px; width: 100%; background: transparent url('http://zurka.us/bg_overlay_black.png') repeat scroll 0 0; font-family: verdana; font-size: 11px;">
<div style="color: #fff; margin: 10px; text-align: center; display: block; position: relative; z-index: 1;">This is Kakashi from the Naruto anime.</div>
</p></div>
<p>	<img src="http://www.quizilla.com/user_images/K/KA/KAK/kakashihatake1226/1158375681_resKAKASHI.jpg" width="300" />
</div>
<p>It&#8217;s a nice effect that can be used for many things, for a nice gallery or something. You could combine this with some JS, add a hover effect to the picture and have it display the caption.</p>
<p><em>edit: <a href="http://www.theodin.co.uk/">theodin</a> posted a comment with a link to this kind of effect, check it out at <a href="http://buildinternet.com/live/boxes/">buildinternet.com</a></em></p>
<p>This is a pretty simple trick that works in different browsers except for older IE versions I think (because IE seems to hate transparent png&#8217;s). Btw, <a href="http://www.ripie6.com/">RIP, IE6</a>.</p>
<p>Let me show you the code and then explain how it works:</p>
<pre class="brush: html">
&lt;div style=&quot;width: 300px; height: 224px; position: relative;&quot;&gt;
    &lt;div style=&quot;position: absolute; bottom: 0px; _bottom: 4px; width: 100%; background: transparent url(&#039;http://zurka.us/bg_overlay_black.png&#039;) repeat scroll 0 0; font-family: verdana; font-size: 11px;&quot;&gt;
        &lt;div style=&quot;color: #fff; margin: 10px; text-align: center; position: relative; z-index: 1;&quot;&gt;This is Kakashi from the Naruto anime.&lt;/div&gt;
    &lt;/div&gt;
    &lt;img src=&quot;http://www.quizilla.com/user_images/K/KA/KAK/kakashihatake1226/1158375681_resKAKASHI.jpg&quot; width=&quot;300&quot; /&gt;
&lt;/div&gt;
</pre>
<p>So basically what we are doing is enclose our image in a relatively positioned DIV element. Inside this element we create another DIV element, absolutely positioned. We stick it on the bottom of it&#8217;s parents div, so it goes displayed on the bottom (we could position it on the top if wanted). The background of this div is a semi-transparent black PNG image, 1x1px (http://zurka.us/bg_overlay_black.png). This is our black box, the content holder.</p>
<p>Now what we need to do is add our text to the box. Inside the box we create another DIV, give it a 10px margin (this way it has some space around it), style the text and put it over the other layers with z-index.</p>
<p>And that&#8217;s it, we have it done. It&#8217;s a simple HTML + CSS effect that I tried to get using different methods (like css opacity and stuff) but didn&#8217;t manage to replicate.</p>
<p>Original image: <a href="http://www.quizilla.com/user_images/K/KA/KAK/kakashihatake1226/1158375681_resKAKASHI.jpg">Kakashi at Quizilla</a></p>
<p>So once again, easy peasy!<br />
Have swing, thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zurka.us/how-to-have-an-opaque-text-on-a-transparent-background/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

