<?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>FlashBannerOnline &#187; CSS</title>
	<atom:link href="http://blog.flashbanneronline.com/category/tutorials/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flashbanneronline.com</link>
	<description>Online Flash Banner Generator blog!</description>
	<lastBuildDate>Sun, 26 Jun 2011 11:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Make Lightbox with CSS &#8211; without Javascript</title>
		<link>http://blog.flashbanneronline.com/2010/07/make-lightbox-with-css-without-javascript/</link>
		<comments>http://blog.flashbanneronline.com/2010/07/make-lightbox-with-css-without-javascript/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 06:58:06 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[avascript:void]]></category>
		<category><![CDATA[Banner]]></category>
		<category><![CDATA[banner effect in css]]></category>
		<category><![CDATA[banner effect only css]]></category>
		<category><![CDATA[banner sample in javascript]]></category>
		<category><![CDATA[blog.flashbanneronline.com]]></category>
		<category><![CDATA[creating a css photo lightbox]]></category>
		<category><![CDATA[creating lightbox in flex]]></category>
		<category><![CDATA[css "black 80%"]]></category>
		<category><![CDATA[css for black overlay]]></category>
		<category><![CDATA[css light box]]></category>
		<category><![CDATA[css lightbox]]></category>
		<category><![CDATA[css lightbox code]]></category>
		<category><![CDATA[css lightbox effect]]></category>
		<category><![CDATA[css lightbox example]]></category>
		<category><![CDATA[css make your own lightbox]]></category>
		<category><![CDATA[css script lightbox]]></category>
		<category><![CDATA[css without flash]]></category>
		<category><![CDATA[csss banner effect]]></category>
		<category><![CDATA[div light box javascript]]></category>
		<category><![CDATA[document.getelementbyid('light')]]></category>
		<category><![CDATA[Effect]]></category>
		<category><![CDATA[fade message box css]]></category>
		<category><![CDATA[fixed banner css no javascript]]></category>
		<category><![CDATA[flash banners css]]></category>
		<category><![CDATA[FlashBannerOnline.com]]></category>
		<category><![CDATA[free css lightbox]]></category>
		<category><![CDATA[free css templates, flash banner, lightbox]]></category>
		<category><![CDATA[free lightbox javascript]]></category>
		<category><![CDATA[full page fading black overlay]]></category>
		<category><![CDATA[greybox call without click]]></category>
		<category><![CDATA[how to create non-javascript lightbox]]></category>
		<category><![CDATA[how to make a light box without javascript]]></category>
		<category><![CDATA[how to make light box by css3 & javascript & more effect]]></category>
		<category><![CDATA[insert a style to make the page overlay 75% opaque javascript]]></category>
		<category><![CDATA[javascript black_overlay (lightbox) more than 1 page]]></category>
		<category><![CDATA[javascript create lightbox]]></category>
		<category><![CDATA[javascript flash lightbox]]></category>
		<category><![CDATA[javascript lightbox black overlay fade]]></category>
		<category><![CDATA[javascript lightbox example]]></category>
		<category><![CDATA[javascript lightboxes]]></category>
		<category><![CDATA[javascript photo lightbox]]></category>
		<category><![CDATA[lighbox with css]]></category>
		<category><![CDATA[light box css]]></category>
		<category><![CDATA[light box java script in login form]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[lightbox "without flash"]]></category>
		<category><![CDATA[lightbox black css3]]></category>
		<category><![CDATA[lightbox block java script]]></category>
		<category><![CDATA[lightbox css]]></category>
		<category><![CDATA[lightbox effect in css and javascript]]></category>
		<category><![CDATA[lightbox effect without lightbox]]></category>
		<category><![CDATA[lightbox example div]]></category>
		<category><![CDATA[lightbox fixed css]]></category>
		<category><![CDATA[lightbox in css]]></category>
		<category><![CDATA[lightbox in html without javascript]]></category>
		<category><![CDATA[lightbox javascript code]]></category>
		<category><![CDATA[lightbox javascript for displaying document]]></category>
		<category><![CDATA[lightbox no javascript]]></category>
		<category><![CDATA[lightbox with css]]></category>
		<category><![CDATA[lightbox without divs]]></category>
		<category><![CDATA[lightbox without javascript]]></category>
		<category><![CDATA[lightbox without javascript blogger]]></category>
		<category><![CDATA[lightbox without js]]></category>
		<category><![CDATA[Make]]></category>
		<category><![CDATA[make a div display in lightbox]]></category>
		<category><![CDATA[making a div appear with lightbox]]></category>
		<category><![CDATA[making lightbox with just css]]></category>
		<category><![CDATA[navigatetourl(javascriptlightbox)]]></category>
		<category><![CDATA[no javascript lightbox]]></category>
		<category><![CDATA[non java script lightbox in php]]></category>
		<category><![CDATA[non javascript css lightbox code]]></category>
		<category><![CDATA[onclick javascript lightbox]]></category>
		<category><![CDATA[show hidden div css only "without javascript"]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=363</guid>
		<description><![CDATA[.You may call it Lightbox, or Greybox, or Thickbox, but it&#8217;s always the same effect When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground. I mean this effect In the [...]]]></description>
			<content:encoded><![CDATA[<p>.You may call it Lightbox, or Greybox, or Thickbox, but it&#8217;s always the same effect</p>
<p>When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground.</p>
<p>I mean this effect</p>
<p><a href="http://blog.flashbanneronline.com/wp-content/uploads/2010/07/lightbox.jpg"><img class="aligncenter size-full wp-image-364" title="lightbox" src="http://blog.flashbanneronline.com/wp-content/uploads/2010/07/lightbox.jpg" alt="" width="500" height="282" /></a></p>
<p>In the upper example, when clicking on a photo the site fades to black and shows the photo, in the lower one when clicking on &#8220;login&#8221; the site fades to white and shows the login form.</p>
<p>There are tons of Lightbox scripts in the web, each one with its unique features and limitations, but all require massive use of Javascript or the installation of javascript frameworks.</p>
<p>In some cases, there are &#8220;lightweight&#8221; versions with &#8220;only&#8221; 40KB of Javascript.<br />
<span id="more-363"></span></p>
<p>This example does not want to compete with those scripts, but if you are looking for a simple, 100% CSS, 0% javascript lightbox, this may help you.</p>
<p>Features of this Lightbox:</p>
<p>100% CSS as said</p>
<p>You can insert any content in it (some scripts out there only allow images)</p>
<p>That&#8217;s all. Did you need something more? Think wisely&#8230;</p>
<p>Let&#8217;s start with the CSS</p>
<pre class="brush: css; title: ; notranslate">

.black_overlay{
 display: none;
 position: absolute;
 top: 0%;
 left: 0%;
 width: 100%;
 height: 100%;
 background-color: black;
 z-index:1001;
 -moz-opacity: 0.8;
 opacity:.80;
 filter: alpha(opacity=80);
 }

 .white_content {
 display: none;
 position: absolute;
 top: 25%;
 left: 25%;
 width: 50%;
 height: 50%;
 padding: 16px;
 border: 16px solid orange;
 background-color: white;
 z-index:1002;
 overflow: auto;
 }
</pre>
<p>The <strong>black_overlay</strong> class is the layer that will make the web page seem to fade. It&#8217;s a black 80% opaque background as long and wide as the browser that will overlay the web page (look at the z-index) and at the moment is not shown (look at the display).</p>
<p>The <strong>white content</strong> class is the layer with the photo/login screen/whatever you want to appear in the Lightbox overlay. It&#8217;s a white layer to be placed over the black_overlay layer (look at the z-index, greater than the black_overlay one). The overflow allows you to have a scrollable content.</p>
<p>In the html file, put this line just before the  tag</p>
<pre class="brush: xml; title: ; notranslate">

&lt;div id=&quot;light&quot;&gt;Hi, I am an happy lightbox&lt;/div&gt;&lt;div id=&quot;fade&quot;&gt;&lt;/div&gt;
</pre>
<p>Now, trig the action you want to open the Lightbox and insert this code:</p>
<pre class="brush: jscript; title: ; notranslate">

document.getElementById('light').style.display='block';
document.getElementById('fade').style.display='block';
</pre>
<p>For example, in a link would be:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;a href = &quot;javascript:void(0)&quot; onclick = &quot;document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'&quot;&gt;Click me&lt;/a&gt;
</pre>
<p>Remember to include in the lightbox the code to close it, for example</p>
<div>
<pre class="brush: xml; title: ; notranslate">&lt;/div&gt;
&lt;div&gt;&lt;a href = &quot;javascript:void(0)&quot; onclick = &quot;document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'&quot;&gt;Hide me&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;</pre>
</div>
<p>A complete example page could be</p>
<pre class="brush: xml; title: ; notranslate">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
 &lt;html&gt;
 &lt;head&gt;

 &lt;title&gt;LIGHTBOX EXAMPLE&lt;/title&gt;
 &lt;style&gt;

 .black_overlay{
 display: none;
 position: absolute;
 top: 0%;
 left: 0%;
 width: 100%;
 height: 100%;
 background-color: black;
 z-index:1001;
 -moz-opacity: 0.8;
 opacity:.80;
 filter: alpha(opacity=80);
 }

 .white_content {
 display: none;
 position: absolute;
 top: 25%;
 left: 25%;
 width: 50%;
 height: 50%;
 padding: 16px;
 border: 16px solid orange;
 background-color: white;
 z-index:1002;
 overflow: auto;
 }
 &lt;/style&gt;
 &lt;/head&gt;
 &lt;body&gt;
 &lt;p&gt;This is the main content. To display a lightbox click &lt;a href = &quot;javascript:void(0)&quot; onclick = &quot;document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
 &lt;div id=&quot;light&quot;&gt;This is the lightbox content. &lt;a href = &quot;javascript:void(0)&quot; onclick = &quot;document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'&quot;&gt;Close&lt;/a&gt;&lt;/div&gt;
 &lt;div id=&quot;fade&quot;&gt;&lt;/div&gt;
 &lt;/body&gt;
 &lt;/html&gt;
</pre>
<div id="html-6">
<div style="font-family: monospace;"></div>
</div>
<p>That you can find up and running <a href="http://www.emanueleferonato.com/downloads/lightbox.html" target="_blank">in this page</a>.</p>
<p>In this example everything is static and preloaded, but you can easily add some php/ajax code to make it more dynamic while keeping the effect 100% CSS based.</p>
<p>Hope you will find it useful, should you use it in one of your works send me a comment and I&#8217;ll feature your site as example.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2010/07/make-lightbox-with-css-without-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Edit the CSS styles of an element in Javascript</title>
		<link>http://blog.flashbanneronline.com/2009/10/edit-the-css-styles-of-an-element-in-javascript/</link>
		<comments>http://blog.flashbanneronline.com/2009/10/edit-the-css-styles-of-an-element-in-javascript/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 05:30:59 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[getElementById]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[styles]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=184</guid>
		<description><![CDATA[I’ve actually started to learn the Internet beast JavaScript, and I think it’s about time I shared some knowledge I’ve gathered from problems I had when starting out. The first of which is CSS styles. When starting out, one of the basic things I wanted to do was to change what the user sees dynamically. [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve actually started to learn the Internet beast JavaScript, and I think it’s about time I shared some knowledge I’ve gathered from problems I had when starting out.</p>
<p>The first of which is CSS styles. When starting out, one of the basic things I wanted to do was to change what the user sees dynamically. Not an easy task when there are few good examples online.</p>
<p>One of the first things you have to do is be able to find which element you want to change. For this you have to do a bit of “DOM” navigating, this scary thing is the Document Object Model, I don’t fully understand it yet myself, but from what little I do know, it reduces the HTML tags to objects. But that’s for another tutorial.</p>
<p>Here is an example basic HTML doc (with some inline JavaScript):</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;style type="text/css"&gt;
&lt;!--
.CellClass
{
	background-color:#CCC;
}
--&gt;
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
&lt;!--
function doThis()
{
// code to go here
}
--&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body onLoad="doThis()"&gt;

&lt;table width="300" border="1" cellspacing="5" cellpadding="0"&gt;
  &lt;tr&gt;
    &lt;td id="Cell01"&gt;&amp;nbsp;&lt;/td&gt;
    &lt;td id="Cell02"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>OK, so we’ve got a table and a class of “CellClass” applied to the cells. Also we have a JS function that runs once the body of our page has loaded.</p>
<p>Now, let’s edit that with JS! (all code below will be placed where “// code to go here” is in our JavaScript)</p>
<p>First, lets get a reference to one of our cells:</p>
<pre>document.getElementById('Cell01')</pre>
<p>Then we browse through to the style:</p>
<pre>document.getElementById('Cell01').style.backgroundColor = '#000000';</pre>
<p>That’s it! Test your page in a browser and see your background colour change!</p>
<p>Please note that this does not effect the actual class, this simply applies a style that overrides the class.</p>
<p>If anybody knows a method of actually altering the CSS classes, I’m open to suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2009/10/edit-the-css-styles-of-an-element-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Lightbox without JavaScript!</title>
		<link>http://blog.flashbanneronline.com/2009/10/make-lightbox-without-javascript/</link>
		<comments>http://blog.flashbanneronline.com/2009/10/make-lightbox-without-javascript/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 05:22:50 +0000</pubDate>
		<dc:creator>Behrouz Pooladrag</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA["document.getelementbyid('light').style.display='none';document.getelementbyid('fade').style.display='none'">close]]></category>
		<category><![CDATA[avascript:void]]></category>
		<category><![CDATA[avascript:void(0)"onclick = "document.getelementbyid('light').style.display='block';document.getelementbyid('fade').style.display='block'"]]></category>
		<category><![CDATA[create light box in javascript]]></category>
		<category><![CDATA[css document fade]]></category>
		<category><![CDATA[document.getelementbyid('light')]]></category>
		<category><![CDATA[document.getelementbyid('light').style.display]]></category>
		<category><![CDATA[document.getelementbyid('light').style.display in js]]></category>
		<category><![CDATA[document.getelementbyid('light').style.display='block']]></category>
		<category><![CDATA[document.getelementbyid('light').style.display='block';document.getelementbyid('fade').style.display='block']]></category>
		<category><![CDATA[document.getelementbyid('light').style.display='none';document.getelementbyid('fade').style.display='none]]></category>
		<category><![CDATA[document.getelementbyid('login').style.display = "none";]]></category>
		<category><![CDATA[document.getelementbyid.style.mozopacity example]]></category>
		<category><![CDATA[greybox]]></category>
		<category><![CDATA[how to call lightbox from javascript]]></category>
		<category><![CDATA[how to make a light box without javascript]]></category>
		<category><![CDATA[how to make a lightbox, java]]></category>
		<category><![CDATA[ip:207.182.137.187 id]]></category>
		<category><![CDATA[javascript black_overlay (lightbox) more than 1 page]]></category>
		<category><![CDATA[javascript change fade content]]></category>
		<category><![CDATA[javascript:void(0)" onclick="document.getelementbyid('light').style.display='block';document.getelementbyid('fade').style.display='block']]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[lightbox java examples]]></category>
		<category><![CDATA[lightbox without a]]></category>
		<category><![CDATA[lightbox without java]]></category>
		<category><![CDATA[lightbox without javascript]]></category>
		<category><![CDATA[onclik javascript lightbox]]></category>
		<category><![CDATA[thickbox]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.flashbanneronline.com/?p=44</guid>
		<description><![CDATA[You may call it Lightbox, or Greybox, or Thickbox, but it&#8217;s always the same effect. When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground. I mean this effect In the [...]]]></description>
			<content:encoded><![CDATA[<p>You may call it Lightbox, or Greybox, or Thickbox, but it&#8217;s always the same effect.</p>
<p>When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground.</p>
<p>I mean this effect</p>
<p>In the upper example, when clicking on a photo the site fades to black and shows the photo, in the lower one when clicking on &#8220;login&#8221; the site fades to white and shows the login form.</p>
<p>There are tons of Lightbox scripts in the web, each one with its unique features and limitations, but all require massive use of Javascript or the installation of javascript frameworks.</p>
<p>In some cases, there are &#8220;lightweight&#8221; versions with &#8220;only&#8221; 40KB of Javascript.</p>
<p>This example does not want to compete with those scripts, but if you are looking for a simple, 100% CSS, 0% javascript lightbox, this may help you.</p>
<p>Features of this Lightbox:</p>
<p>100% CSS as said</p>
<p>You can insert any content in it (some scripts out there only allow images)</p>
<p>That&#8217;s all. Did you need something more? Think wisely&#8230;</p>
<p>Let&#8217;s start with the CSS</p>
<div>
<div id="css-1">
<div style="font-family: monospace;">
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">.black_overlay<span style="color: #66cc66;">{</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">display</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">none</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">position</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">absolute</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">top</span><span style="color: #66cc66;">:</span> 0%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">left</span><span style="color: #66cc66;">:</span> 0%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">width</span><span style="color: #66cc66;">:</span> <span style="color: #800000;">100</span>%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">height</span><span style="color: #66cc66;">:</span> <span style="color: #800000;">100</span>%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #66cc66;">:</span> <span style="color: #000000; font-weight: bold;">black</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #66cc66;">:</span><span style="color: #800000;">1001</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">-moz-opacity<span style="color: #66cc66;">:</span> <span style="color: #800000;">0.8</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">opacity<span style="color: #66cc66;">:</span>.80;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">filter<span style="color: #66cc66;">:</span> alpha<span style="color: #66cc66;">(</span>opacity=<span style="color: #800000;">80</span><span style="color: #66cc66;">)</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #66cc66;">}</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">.white_content <span style="color: #66cc66;">{</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">display</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">none</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">position</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">absolute</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">top</span><span style="color: #66cc66;">:</span> <span style="color: #800000;">25</span>%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">left</span><span style="color: #66cc66;">:</span> <span style="color: #800000;">25</span>%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">width</span><span style="color: #66cc66;">:</span> <span style="color: #800000;">50</span>%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">height</span><span style="color: #66cc66;">:</span> <span style="color: #800000;">50</span>%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">padding</span><span style="color: #66cc66;">:</span> 16px;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">border</span><span style="color: #66cc66;">:</span> 16px <span style="color: #993333;">solid</span> orange;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">white</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #66cc66;">:</span><span style="color: #800000;">1002</span>;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">auto</span>;</div>
<p><span style="color: #66cc66;">}</span></div>
</div>
</div>
<p>The <strong>black_overlay</strong> class is the layer that will make the web page seem to fade. It&#8217;s a black 80% opaque background as long and wide as the browser that will overlay the web page (look at the z-index) and at the moment is not shown (look at the display).</p>
<p>The <strong>white content</strong> class is the layer with the photo/login screen/whatever you want to appear in the Lightbox overlay. It&#8217;s a white layer to be placed over the black_overlay layer (look at the z-index, greater than the black_overlay one). The overflow allows you to have a scrollable content.</p>
<p>In the html file, put this line just before the  tag</p>
<div>
<div id="html-2">
<div style="font-family: monospace;">
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;light&#8221;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;white_content&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Hi, I am an happy lightbox<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #66cc66;">/</span>div&gt;&lt;div <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;fade&#8221;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;black_overlay&#8221;</span>&gt;&lt;<span style="color: #66cc66;">/</span>div&gt;</span></div>
</div>
</div>
</div>
<p>Now, trig the action you want to open the Lightbox and insert this code:</p>
<div>
<div id="html-3">
<div style="font-family: monospace;">
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">document.getElementById(&#8216;light&#8217;).style.display=&#8217;block&#8217;;document.getElementById(&#8216;fade&#8217;).style.display=&#8217;block&#8217;;</div>
</div>
</div>
</div>
<p>For example, in a link would be:</p>
<div>
<div id="html-4">
<div style="font-family: monospace;">
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;javascript:void(0)&#8221;</span> <span style="color: #000066;">onclick</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;document.getElementById(&#8216;light&#8217;).style.display=&#8217;block&#8217;;document.getElementById(&#8216;fade&#8217;).style.display=&#8217;block&#8217;&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Click me<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span></div>
</div>
</div>
</div>
<p>Remember to include in the lightbox the code to close it, for example</p>
<div>
<p><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;javascript:void(0)&#8221;</span> <span style="color: #000066;">onclick</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;document.getElementById(&#8216;light&#8217;).style.display=&#8217;none&#8217;;document.getElementById(&#8216;fade&#8217;).style.display=&#8217;none&#8217;&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Hide me<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span></div>
<p>A complete example page could be</p>
<div>
<div id="html-6">
<div style="font-family: monospace;">
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221;&gt;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></span>LIGHTBOX EXAMPLE<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;style&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">.black_overlay{</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">display: none;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">position: absolute;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">top: 0%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">left: 0%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">width: 100%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">height: 100%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">background-color: black;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">z-index:1001;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">-moz-opacity: 0.8;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">opacity:.80;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">filter: alpha(opacity=80);</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">}</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">.white_content {</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">display: none;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">position: absolute;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">top: 25%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">left: 25%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">width: 50%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">height: 50%;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">padding: 16px;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">border: 16px solid orange;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">background-color: white;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">z-index:1002;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">overflow: auto;</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;">}</div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;light&#8221;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;white_content&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>This is the lightbox content. <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;javascript:void(0)&#8221;</span> <span style="color: #000066;">onclick</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;document.getElementById(&#8216;light&#8217;).style.display=&#8217;none&#8217;;document.getElementById(&#8216;fade&#8217;).style.display=&#8217;none&#8217;&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Close<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #66cc66;">/</span>a&gt;&lt;<span style="color: #66cc66;">/</span>div&gt;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;fade&#8221;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&#8220;black_overlay&#8221;</span>&gt;&lt;<span style="color: #66cc66;">/</span>div&gt;</span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
<div style="margin: 0pt; padding: 0pt; font-family: monospace; font-weight: normal; font-style: normal; -moz-background-clip: inherit; -moz-background-origin: inherit; -moz-background-inline-policy: inherit;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></div>
<p><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></span>This is the main content. To display a lightbox click <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;javascript:void(0)&#8221;</span> <span style="color: #000066;">onclick</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&#8220;document.getElementById(&#8216;light&#8217;).style.display=&#8217;block&#8217;;document.getElementById(&#8216;fade&#8217;).style.display=&#8217;block&#8217;&#8221;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>here<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #66cc66;">/</span>a&gt;&lt;<span style="color: #66cc66;">/</span>p&gt;</span></div>
</div>
</div>
<p><strong>That you can find up and running <a href="http://www.emanueleferonato.com/downloads/lightbox.html" target="_blank">in this page</a>.</strong></p>
<p>In this example everything is static and preloaded, but you can easily add some php/ajax code to make it more dynamic while keeping the effect 100% CSS based.</p>
<p>Hope you will find it useful, should you use it in one of your works send me a comment and I&#8217;ll feature your site as example.<br />
<span style="color: #808080;">By :<a href="http://www.emanueleferonato.com" target="_blank"> emanueleferonato </a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashbanneronline.com/2009/10/make-lightbox-without-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced
Database Caching 16/50 queries in 0.115 seconds using disk: basic
Object Caching 1441/1632 objects using disk: basic

Served from: blog.flashbanneronline.com @ 2012-02-11 13:07:51 -->
