<?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>Gisoku Budo - musings of an amputee martial artist &#187; NextGen Gallery</title>
	<atom:link href="http://www.gisoku-budo.com/tag/nextgen-gallery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gisoku-budo.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 Jun 2010 09:00:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress fixes part 2 – Page elements appearing in front of pop-up images in the NextGen Gallery / lightbox plugins</title>
		<link>http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-2-%e2%80%93-page-elements-appearing-in-front-of-pop-up-images-in-the-nextgen-gallery-lightbox-plugins/</link>
		<comments>http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-2-%e2%80%93-page-elements-appearing-in-front-of-pop-up-images-in-the-nextgen-gallery-lightbox-plugins/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 03:20:22 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Wordpress/system stuff]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[Lightbox]]></category>
		<category><![CDATA[NextGen Gallery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[Wordpress errors]]></category>

		<guid isPermaLink="false">http://www.gisoku-budo.com/?p=519</guid>
		<description><![CDATA[This one&#8217;s actually a bit impromptu as I only just figured it out and wanted to share it with the community in case anyone else comes across the same problem.
Since installing the new themes here and on my other blog, I found that all my image galleries that were put together using the NextGen Gallery [...]


Related posts:<ol><li><a href='http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-3-%e2%80%93-customising-the-wp_list_pages-navigation-menu-drop-downs-to-insert-elements-between-each-menu-heading-dynamically/' rel='bookmark' title='Permanent Link: Wordpress fixes part 3 – Customising the wp_list_pages navigation menu drop-downs to insert elements between each menu heading dynamically'>Wordpress fixes part 3 – Customising the wp_list_pages navigation menu drop-downs to insert elements between each menu heading dynamically</a></li>
<li><a href='http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-1-warning-cannot-modify-header-information-headers-already-sent-by/' rel='bookmark' title='Permanent Link: Wordpress fixes part 1 &#8211; Warning: Cannot modify header information &#8211; headers already sent by&#8230;'>Wordpress fixes part 1 &#8211; Warning: Cannot modify header information &#8211; headers already sent by&#8230;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This one&#8217;s actually a bit impromptu as I only just figured it out and wanted to share it with the community in case anyone else comes across the same problem.</p>
<p>Since installing the new themes here and on <a href="http://www.retro-otaku">my other blog</a>, I found that all my image galleries that were put together using the NextGen Gallery plugin (which also uses the lightbox plugin) had all the elements from the navigation bar appearing above the pop-up image. <a href="http://wordpress.org/support/topic/372149">I posted up a question</a> on the Wordpress support forums to see if anyone could help, and didn&#8217;t get a solution (though someone else posted up that they had the same problem, so I felt happy that it wasn&#8217;t just me which was a relief!)&#8230; but because I&#8217;m prone to lightbulb moments, I thought of something that may be causing the error, and thanks to some poking around with Firebug I found a solution, and it&#8217;s all to do with the z-index properties in the CSS files loaded into both of my blogs.</p>
<p>First up, some code:</p>
<h4>Previous code:</h4>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.gisoku-budo.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=519&amp;download=GisokuBudoWPFixesPt2-wrong.txt">GisokuBudoWPFixesPt2-wrong.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5194"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p519code4"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav-menu</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#nav-menu</span> ul <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">35px</span> <span style="color: #933;">10px</span> <span style="color: #933;">35px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">list-style-position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">outside</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">300</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #933;">18pt</span>/<span style="color: #933;">24pt</span> Tahoma<span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffffff</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>This is the CSS that governs how my navigation bar behaves itself &#8211; it seems a little convoluted, but it&#8217;s setup like this (and uses the rules that follow) to get the nice jQuery-driven drop-downs that can cascade out to multiple levels (there&#8217;ll be more on some PHP tricks I&#8217;ve used to customise my nav bar in the concluding post on WP fixes I&#8217;ll be posting up later). The property that is causing all the grief is actually the z-index property, which is currently set to 300 as per the tute I used as a reference to put the menu together. If we click on one of the images and wand our cursor over the pop-up version via Firebug to get the properties of the containing divs though, we reveal another z-index property that&#8217;s clashing. The #stimuli_overlay div that acts as the parent div for the goodies that follow has a z-index of 90, as referenced via the lightbox.css that is installed as part of the default Lightbox plugin:</p>
<h4>lightbox.css</h4>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.gisoku-budo.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=519&amp;download=GisokuBudoWPFixesPt2-ref.txt">GisokuBudoWPFixesPt2-ref.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5195"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p519code5"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#stimuli_overlay</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">90</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The solution to this is now simple &#8211; either change the lightbox.css file or change your style.css attached to your theme. I chose the latter since I didn&#8217;t want to touch the plugin defaults, as it would cause issues later on if the plugin were ever upgraded.</p>
<h4>New code:</h4>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://www.gisoku-budo.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=519&amp;download=GisokuBudoWPFixesPt2-fixed.txt">GisokuBudoWPFixesPt2-fixed.txt</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p5196"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p519code6"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav-menu</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#nav-menu</span> ul <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">35px</span> <span style="color: #933;">10px</span> <span style="color: #933;">35px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">list-style-position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">outside</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">50</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* Causes bugs for NGG, has to be smaller than #stimuli_overlay z-index, which is 90 by default, so move value of #nav-menu to 50 instead of 300 */</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #933;">18pt</span>/<span style="color: #933;">24pt</span> Tahoma<span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffffff</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>There, problem solved &#8211; 50 is still ample to ensure the dropdowns sit on top of other elements, and small enough to ensure it doesn&#8217;t interfere with the lightbox CSS.</p>
<p>And because I&#8217;m big on commenting in my code to avoid getting confused when maintaining it, I&#8217;ve also added that great big string of text to my CSS to remember why it&#8217;s changed from the standard 300 recommended by the tute I used as a reference.</p>
<p>In theory, you can make the z-index property anything you like, just as long as it doesn&#8217;t go above the z-index value of the divs that sit above your page when you call the lightbox plugin via NextGen Gallery.</p>
<p>I was originally planning on writing two Wordpress pieces, but I only worked this one out a couple of hours ago and thought I should share <img src='http://www.gisoku-budo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Next one will be the last, then I&#8217;ll get back to the usual program I promise!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.gisoku-budo.com%2F2010%2F03%2Fwordpress-fixes-part-2-%25e2%2580%2593-page-elements-appearing-in-front-of-pop-up-images-in-the-nextgen-gallery-lightbox-plugins%2F&amp;linkname=Wordpress%20fixes%20part%202%20%E2%80%93%20Page%20elements%20appearing%20in%20front%20of%20pop-up%20images%20in%20the%20NextGen%20Gallery%20%2F%20lightbox%20plugins"><img src="http://www.gisoku-budo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>

<p>Related posts:<ol><li><a href='http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-3-%e2%80%93-customising-the-wp_list_pages-navigation-menu-drop-downs-to-insert-elements-between-each-menu-heading-dynamically/' rel='bookmark' title='Permanent Link: Wordpress fixes part 3 – Customising the wp_list_pages navigation menu drop-downs to insert elements between each menu heading dynamically'>Wordpress fixes part 3 – Customising the wp_list_pages navigation menu drop-downs to insert elements between each menu heading dynamically</a></li>
<li><a href='http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-1-warning-cannot-modify-header-information-headers-already-sent-by/' rel='bookmark' title='Permanent Link: Wordpress fixes part 1 &#8211; Warning: Cannot modify header information &#8211; headers already sent by&#8230;'>Wordpress fixes part 1 &#8211; Warning: Cannot modify header information &#8211; headers already sent by&#8230;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.gisoku-budo.com/2010/03/wordpress-fixes-part-2-%e2%80%93-page-elements-appearing-in-front-of-pop-up-images-in-the-nextgen-gallery-lightbox-plugins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
