<?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>Designers Chair &#187; HTML</title>
	<atom:link href="http://www.designers-chair.com/tag/html-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designers-chair.com</link>
	<description>photoshop tutorials, html css tutorials</description>
	<lastBuildDate>Sat, 05 Dec 2009 22:18:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Image Transparency</title>
		<link>http://www.designers-chair.com/2009/03/css-image-transparency/</link>
		<comments>http://www.designers-chair.com/2009/03/css-image-transparency/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 17:01:50 +0000</pubDate>
		<dc:creator>Designers Chair</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[opacity]]></category>
		<category><![CDATA[transparency]]></category>

		<guid isPermaLink="false">http://www.designers-chair.com/?p=172</guid>
		<description><![CDATA[Learn how to change image transparency (opacity) using only CSS code. Simple but useful technique that you can use to create nice looking gallery or just crossover effect.


Here is how it looks like&#8230;
Changing image opacity (transparency) using css :
  
Image opacity wih different crossover effect (move your cursor over it) :
  
So let&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Learn how to change image transparency (opacity) using only CSS code. Simple but useful technique that you can use to create nice looking gallery or just crossover effect.<span id="more-172"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-9392223937717562";
/* Link_na_pocetku */
google_ad_slot = "0581975753";
google_ad_width = 468;
google_ad_height = 15;
// --></script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p>
<p>Here is how it looks like&#8230;</p>
<p><strong>Changing image opacity (transparency) using css :</strong><br />
<img src="/images/css/image_transparency/DC2.jpg" alt="DC logo" width="145" height="115" /> <img style="opacity:0.7;filter:alpha(opacity=70)" src="/images/css/image_transparency/DC2.jpg" alt="DC logo" width="145" height="115" /> <img style="opacity:0.4;filter:alpha(opacity=40)" src="/images/css/image_transparency/DC2.jpg" alt="DC logo" width="145" height="115" /></p>
<p><strong>Image opacity wih different crossover effect (move your cursor over it) :</strong><br />
<img style="opacity:0.5;filter:alpha(opacity=50)" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.5;this.filters.alpha.opacity=50" src="/images/css/image_transparency/DC2.jpg" alt="DC logo" width="145" height="115" /> <a href="http://www.designers-chair.com/" target="_blank"> <img style="opacity:0.5;filter:alpha(opacity=50);border: 0pt none;" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.4;this.filters.alpha.opacity=40" src="/images/css/image_transparency/DC2.jpg" alt="DC Logo" width="145" height="115" /></a></p>
<p>So let&#8217;s get started. First create a new HTML document (<em>index.html</em>), create folder &#8220;style&#8221; and inside it create our CSS file (<em>style.css</em>).</p>
<p>Our basic HTML file looks like this :</p>
<pre>&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;CSS Image Transparency | Designers-Chair.com&lt;/title&gt;
	&lt;link href="style/style.css" rel="stylesheet" type="text/css"&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Tag <em>title</em> defines page name :</p>
<pre>&lt;title&gt;CSS Image Transparency | Designers-Chair.com&lt;/title&gt;</pre>
<p>This is the path to our external CSS file :</p>
<pre>&lt;link href="style/style.css" rel="stylesheet" type="text/css"&gt;</pre>
<p><strong>Body</strong> is empty so nothing will be displayed when we open our HTML file in web browser. Now we are going to display our picture.</p>
<pre>...
&lt;body&gt;
&lt;img src="DClogo.jpg" width="145" height="115" alt="DC Logo"/&gt;
&lt;/body&gt;
...</pre>
<p>Now we see the picture but there is no transparency. Open style.css and add the following code :</p>
<pre>img
{
	opacity:0.5;
	filter:alpha(opacity=50);
}</pre>
<p>Notice how we have two same properties for img tag. This is because Internet Explorer uses <strong>filter:alpha(opacity:x)</strong> function (x = 0-100), but Firefox and Crome use <strong>opacity:x</strong> (x = 0-1). 0 = invisible, 1/100 = 100% visible.</p>
<p>Crossover effect is now easy to do. We just need to add <strong>onmouseover</strong> and <strong>onmouseout</strong>.</p>
<pre>...
&lt;img src="DClogo.jpg" width="145" height="115" alt="DC Logo"
onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"
onmouseout="this.style.opacity=0.5;this.filters.alpha.opacity=50" /&gt;
...</pre>
<p>You can also use <strong>hover</strong> function (instead of onmouseover, onmouseout) , just add it to style.css. Note that this technique does not work with IE 6 (:hover is supported only on <strong>&lt;a></strong>  elements).</p>
<pre>
img
{
	opacity:0.5;               /*Firefox &#038; Chrome*/
	filter:alpha(opacity=50);   /* IE */

}

img:hover
{
	opacity:1;               /*Firefox &#038; Chrome*/
	filter:alpha(opacity=100);   /* IE */
}
</pre>
<p>That&#8217;s it! Simple but very useful and attractive.</p>
<p><a href="http://www.designers-chair.com/images/css/image_transparency/Image Transparency.rar"><img class="alignright" style="border: 0pt none;" title="Download this project" src="http://www.designers-chair.com/images/css/image_transparency/download.jpg" alt="" width="160" height="40" /></a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9392223937717562";
/* Embedani */
google_ad_slot = "9865879433";
google_ad_width = 468;
google_ad_height = 60;
// --></script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designers-chair.com/2009/03/css-image-transparency/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Basic HTML file</title>
		<link>http://www.designers-chair.com/2009/02/basic-html-file/</link>
		<comments>http://www.designers-chair.com/2009/02/basic-html-file/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 18:32:32 +0000</pubDate>
		<dc:creator>Designers Chair</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.designers-chair.com/?p=7</guid>
		<description><![CDATA[Create a basic HTML file that you can use as a startup for any web site.
This tutorial will be finished soon&#8230;




]]></description>
			<content:encoded><![CDATA[<p>Create a basic HTML file that you can use as a startup for any web site.</p>
<p><span id="more-7"></span>This tutorial will be finished soon&#8230;</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9392223937717562";
/* Embedani */
google_ad_slot = "9865879433";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designers-chair.com/2009/02/basic-html-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
