<?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>Penguination Project &#187; Programming</title>
	<atom:link href="http://penguinationproject.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://penguinationproject.com</link>
	<description></description>
	<lastBuildDate>Thu, 29 Oct 2009 19:51:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Htaccess automatic CHMOD tutorial</title>
		<link>http://penguinationproject.com/htaccess-automatic-chmod-tutorial</link>
		<comments>http://penguinationproject.com/htaccess-automatic-chmod-tutorial#comments</comments>
		<pubDate>Sat, 20 Jun 2009 19:59:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[htaccess tutorial]]></category>

		<guid isPermaLink="false">http://penguinationproject.com/?p=203</guid>
		<description><![CDATA[Sometimes we should ensure that particular files chmod configuration is configured properly, and if we are not sure we can simply use .htaccess for proper auto configuration, for example you have some file config.ini and it&#8217;s chmod should be 755, and if you have 200 files like config.ini in lots of directories ? 
Here is the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we should ensure that particular files chmod configuration is configured properly, and if we are not sure we can simply use .htaccess for proper auto configuration, for example you have some file config.ini and it&#8217;s chmod should be 755, and if you have 200 files like config.ini in lots of directories ? </p>
<p>Here is the .htaccess solution :</p>
<blockquote><p>chmod .htaccess files 644<br />
chmod pl files 755</p>
<p>chmod ini files 755</p>
<p>&#8230;&#8230;&#8230;</p></blockquote>
<p>This htaccess method could be used for any extension. </p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinationproject.com/htaccess-automatic-chmod-tutorial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Htaccess custom error page</title>
		<link>http://penguinationproject.com/htaccess-custom-error-page</link>
		<comments>http://penguinationproject.com/htaccess-custom-error-page#comments</comments>
		<pubDate>Sat, 20 Jun 2009 18:15:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[htaccess tutorial]]></category>

		<guid isPermaLink="false">http://penguinationproject.com/?p=201</guid>
		<description><![CDATA[Sometimes when your visitors browsing your page and your content was removed or deleted, they will see simple &#8220;not found&#8221; page or 404 error &#8211; not found message set by default with apache server. 
We will modify our server configuration file .htaccess and will show you how to design your custom error page. 
First we will create [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when your visitors browsing your page and your content was removed or deleted, they will see simple &#8220;not found&#8221; page or 404 error &#8211; not found message set by default with apache server. </p>
<p>We will modify our server configuration file .htaccess and will show you how to design your custom error page. </p>
<p>First we will create errorpage.html file , you can use your html or css methods to do that. </p>
<p>create file called errorpage.html in your server root or create file on your desktop and upload it to your server, then edit. </p>
<blockquote><p>Type this code in your errorpage.html file , we didn&#8217;t define headers and body standards, but you can do it ,  any design could be used.</p>
<p>&lt;div style=&#8221;width:500px;margin:0 auto;background:#eee;border:2px solid green&#8221;&gt;</p>
<p>&lt;div style-&#8221;padding:2em;color:#333&#8243;&gt;</p>
<p>&lt;h1&gt;Error Occured&lt;/h1&gt;</p>
<p>&lt;p&gt;</p>
<p>You reached page that doesn&#8217;t exists &#8230;.  &lt;input type=&#8221;button&#8221; value=&#8221;back&#8221; onclick=&#8221;history.go(-1)&#8221;&gt;</p>
<p>&lt;/p&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;/div&gt;</p></blockquote>
<p> </p>
<p>Save your errorpage.html , upload tou the root directory. </p>
<p>Open .htaccess file and type the code below : </p>
<blockquote><p>RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^.*$ /errorpage.html [L]</p></blockquote>
<p>That&#8217;s it ! Save your .htaccess file , now go to any &#8220;not existing page&#8221; just type some mess in your browser url , you will see custom error file ! Congrats , now we know how  to deal with server errors manually. </p>
<blockquote><p>You can modify all possible server errors manually, here is solution :</p>
<p>ErrorDocument 400 /error/400.html<br />
ErrorDocument 401 /error/401.html<br />
ErrorDocument 403 /error/403.html<br />
ErrorDocument 404 /error/404.html<br />
ErrorDocument 500 /error/500.html</p></blockquote>
<p> </p>
<p>Good luck coder !</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinationproject.com/htaccess-custom-error-page/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Magic Quotes theory and the operation</title>
		<link>http://penguinationproject.com/php-magic-quotes-theory-and-the-operation</link>
		<comments>http://penguinationproject.com/php-magic-quotes-theory-and-the-operation#comments</comments>
		<pubDate>Thu, 18 Jun 2009 09:12:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[magic quotes]]></category>
		<category><![CDATA[stripslashes]]></category>

		<guid isPermaLink="false">http://penguinationproject.com/?p=189</guid>
		<description><![CDATA[One of the known PHP developer&#8217;s problems are the quotes and double quotes. It was a sunshine day when we started developing our Twitter related application allowed to users tweet from code tweets that are more than 140 characters.
Everything worked smooth until somewone typed something like this :  Check out my new track &#8220;VNV Nation- [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-190" style="margin-left: 5px; margin-right: 5px;" title="magic_quotes" src="http://penguinationproject.com/wp-content/uploads/2009/06/magic_quotes-300x230.png" alt="magic_quotes" width="300" height="230" />One of the known PHP developer&#8217;s problems are the quotes and double quotes. It was a sunshine day when we started developing our Twitter related application allowed to users tweet from code tweets that are more than 140 characters.</p>
<p>Everything worked smooth until somewone typed something like this :  Check out my new track &#8220;VNV Nation- Electronaut</p>
<p>Yes, he forgot to close double quotes. Thanks to MySQL error functions, insertion wasn&#8217;t done to mysql and it had shown an error.</p>
<p>Magic quotes comes to solve this problem, there are other better methods probably, but it is quiet good for simple applications without complicating string editing functions.</p>
<p><strong>So how to deal with Magic Quotes ? </strong></p>
<p>First we should check if magic quotes are enabled. There are two methods to do that. You can check from code typing</p>
<blockquote>
<pre class="code">&lt;?php
if(get_magic_quotes_gpc())
	echo "Enabled";
else
	echo "Disabled";
?&gt;</pre>
</blockquote>
<p>The second method also could be done from code :</p>
<blockquote><p>&lt;?php</p>
<p>echo phpinfo();</p>
<p>?&gt;</p></blockquote>
<p>The second method will execute and print basic server PHP configuration information, browse through file and find magic_quotes it should be on or off.</p>
<p>Most of the hosting companies enable magic_quotes function in server php.ini by default.</p>
<p><strong>Lets create simple example on how magic_quotes work. </strong></p>
<blockquote>
<pre class="code">&lt;?php
echo $_POST['string'];
?&gt;

&lt;form action='' method='post'&gt;
  Type something: &lt;input type='text' name='string'/&gt;
  &lt;input type='submit'&gt;
&lt;/form&gt;</pre>
</blockquote>
<p>The output will be something like that :   Check out my new track \&#8221;VNV Nation- Electronaut</p>
<p>We will probably want to remove ugly backslashes from string in output ( if you work with mysql database , remove slashes when you make a query call )</p>
<p><strong>Code without slashes :</strong></p>
<blockquote>
<pre class="code">&lt;?php
  echo stripslashes($_POST['string']);
?&gt;

&lt;form action='' method='post'&gt;
  Type something: &lt;input type='text' name='string'/&gt;
  &lt;input type='submit'&gt;
&lt;/form&gt;</pre>
</blockquote>
<p>And a little bit smarter code :</p>
<pre class="code">&lt;?php
<span><span style="color: red;"><span style="color: #000000;">  if(get_magic_quotes_gpc())</span></span></span>
     echo stripslashes($_POST['string']);
  else
     echo $_POST['string'];
?&gt;

&lt;form action='' method='post'&gt;
  Type something: &lt;input type='text' name='string'/&gt;
  &lt;input type='submit'&gt;
&lt;/form&gt;</pre>
<p><strong>You will probably want to create your own magic quotes function : </strong></p>
<blockquote><p>&lt;?php</p>
<p>function magic_string($string)</p>
<p>{</p>
<pre class="code"><span><span style="color: red;"><span style="color: #000000;">if(get_magic_quotes_gpc())</span></span></span>
     return stripslashes($string);
  else
     return $string;</pre>
<p>}</p>
<p>?&gt;</p></blockquote>
<p>We have shown the basic operations of magic quotes usage, please post your examples in comments.</p>
<p>Good luck coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinationproject.com/php-magic-quotes-theory-and-the-operation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS horizontal drop down menu tutorial</title>
		<link>http://penguinationproject.com/css-horizontal-drop-down-menu-tutorial</link>
		<comments>http://penguinationproject.com/css-horizontal-drop-down-menu-tutorial#comments</comments>
		<pubDate>Tue, 09 Jun 2009 19:35:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://penguinationproject.com/?p=128</guid>
		<description><![CDATA[We will create horizontal drop down menu that works with any explorer.
Let&#8217;s start:
Open your .css style file and type these lines :
Create your css drop down menu div object. You can color it&#8217;s background with any color and change width to any size.
#menu {
width: 100%;
background: #ffffff;
float: left;
border-bottom:1px solid #ccc;
}
Next we will create list object for [...]]]></description>
			<content:encoded><![CDATA[<p>We will create horizontal drop down menu that works with any explorer.</p>
<p>Let&#8217;s start:</p>
<p>Open your .css style file and type these lines :</p>
<p>Create your css drop down menu div object. You can color it&#8217;s background with any color and change width to any size.</p>
<blockquote><p>#menu {<br />
width: 100%;<br />
background: #ffffff;<br />
float: left;<br />
border-bottom:1px solid #ccc;<br />
}</p></blockquote>
<p>Next we will create list object for our css menu</p>
<blockquote><p>#menu ul {<br />
list-style: none;<br />
margin: 0;<br />
padding: 0;<br />
width: 13em;<br />
float: left;<br />
background:#f6f6f6;<br />
}</p></blockquote>
<p>Anchor tag css drop down menu styling of first ul layer</p>
<blockquote><p>#menu ul a {<br />
font: wider  12px/16px arial, helvetica, sans-serif;<br />
font-weight:bold;<br />
color:#317b94;<br />
text-transform:uppercase;<br />
display: block;<br />
border-right:1px solid #ccc;<br />
border-top:1px solid #ccc;<br />
margin: 0;<br />
padding: 5px 5px;<br />
}</p></blockquote>
<p>Nice bordering to the first a tag to fit all the design</p>
<blockquote><p>#menu a.first{<br />
border-right:1px solid #ccc;<br />
border-left:1px solid #ccc;<br />
border-top:1px solid #ccc;<br />
}</p></blockquote>
<p>Designing secondary lists and a tags of our css dropdown menu</p>
<blockquote><p>#menu ul li ul a{<br />
border:none;<br />
background:#fff;<br />
color:#3d6876;</p>
<p>}</p></blockquote>
<blockquote><p>
#menu ul li ul a:hover{<br />
background:#a2d9ec;<br />
color:#fff;<br />
}</p></blockquote>
<blockquote><p>#menu ul li ul {<br />
border:1px solid #3d6876;<br />
}</p></blockquote>
<p>All menu that opened on hover</p>
<blockquote><p>#menu a {<br />
color: #000;<br />
background: #f6f6f6;<br />
text-decoration: none;<br />
}</p>
<p>#menu a:hover {<br />
color: #fff;<br />
background: #45b4da;<br />
}<br />
#menu li {position: relative;}</p>
<p>#menu ul ul ul {<br />
position: absolute;<br />
top: 0;<br />
left: 100%;<br />
}</p>
<p>#menu ul ul {<br />
position: absolute;<br />
z-index: 500;<br />
}<br />
div#menu ul ul,<br />
div#menu ul li:hover ul ul,<br />
div#menu ul ul li:hover ul ul<br />
{display: none;}</p>
<p>div#menu ul li:hover ul,<br />
div#menu ul ul li:hover ul,<br />
div#menu ul ul ul li:hover ul<br />
{display: block;}</p></blockquote>
<p>That&#8217;s it , we finished with css, now let&#8217;s create Internet explorer rule for drop down menu, Internet explorer was coded in a strange way , why ? Because they tried to create new standards for all explorers software .. They failed. But lots of users still using internet explorer, we will need to create hover.htc file just for internet explorer browser.</p>
<blockquote><p>Your hover.htc file looks like this, you can copy and paste this code in your created hover.htc file .</p>
<p>&lt;public:attach event=&#8221;ondocumentready&#8221; onevent=&#8221;CSSHover()&#8221; /&gt;<br />
&lt;script&gt;<br />
// &lt;![CDATA[<br />
/**<br />
*    Whatever:hover - V3.00.081222<br />
*    ------------------------------------------------------------<br />
*    Author  - Peter Nederlof, http://www.xs4all.nl/~peterned<br />
*    License - http://creativecommons.org/licenses/LGPL/2.1<br />
*<br />
*    Whatever:hover is free software; you can redistribute it and/or<br />
*    modify it under the terms of the GNU Lesser General Public<br />
*    License as published by the Free Software Foundation; either<br />
*    version 2.1 of the License, or (at your option) any later version.<br />
*<br />
*    Whatever:hover is distributed in the hope that it will be useful,<br />
*    but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br />
*    Lesser General Public License for more details.<br />
*<br />
*    howto: body { behavior:url("csshover3.htc"); }<br />
*    ------------------------------------------------------------<br />
*/</p>
<p>window.CSSHover = (function(){</p>
<p>// regular expressions, used and explained later on.<br />
var REG_INTERACTIVE = /(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active|focus))/i,<br />
REG_AFFECTED = /(.*?)\:(hover|active|focus)/i,<br />
REG_PSEUDO = /[^:]+:([a-z-]+).*/i,<br />
REG_SELECT = /(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi,<br />
REG_CLASS = /\.([a-z0-9_-]*on(hover|active|focus))/i,<br />
REG_MSIE = /msie (5|6|7)/i,<br />
REG_COMPAT = /backcompat/i;</p>
<p>// css prefix, a leading dash would be nice (spec), but IE6 doesn&#8217;t like that.<br />
var CSSHOVER_PREFIX = &#8216;csh-&#8217;;</p>
<p>/**<br />
*    Local CSSHover object<br />
*    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
*/</p>
<p>var CSSHover = {</p>
<p>// array of CSSHoverElements, used to unload created events<br />
elements: [],</p>
<p>// buffer used for checking on duplicate expressions<br />
callbacks: {},</p>
<p>// init, called once ondomcontentready via the exposed window.CSSHover function<br />
init:function() {<br />
// don&#8217;t run in IE8 standards; expressions don&#8217;t work in standards mode anyway,<br />
// and the stuff we&#8217;re trying to fix should already work properly<br />
if(!REG_MSIE.test(navigator.userAgent) &amp;&amp; !REG_COMPAT.test(window.document.compatMode)) return;</p>
<p>// start parsing the existing stylesheets<br />
var sheets = window.document.styleSheets, l = sheets.length;<br />
for(var i=0; i&lt;l; i++) {<br />
this.parseStylesheet(sheets[i]);<br />
}<br />
},</p>
<p>// called from init, parses individual stylesheets<br />
parseStylesheet:function(sheet) {<br />
// check sheet imports and parse those recursively<br />
if(sheet.imports) {<br />
try {<br />
var imports = sheet.imports, l = imports.length;<br />
for(var i=0; i&lt;l; i++) {<br />
this.parseStylesheet(sheet.imports[i]);<br />
}<br />
} catch(securityException){<br />
// trycatch for various possible errors,<br />
// todo; might need to be placed inside the for loop, since an error<br />
// on an import stops following imports from being processed.<br />
}<br />
}</p>
<p>// interate the sheet&#8217;s rules and send them to the parser<br />
try {<br />
var rules = sheet.rules, l = rules.length;<br />
for(var j=0; j&lt;l; j++) {<br />
this.parseCSSRule(rules[j], sheet);<br />
}<br />
} catch(securityException){<br />
// trycatch for various errors, most likely accessing the sheet&#8217;s rules,<br />
// don&#8217;t see how individual rules would throw errors, but you never know.<br />
}<br />
},</p>
<p>// magic starts here &#8230;<br />
parseCSSRule:function(rule, sheet) {</p>
<p>// The sheet is used to insert new rules into, this must be the same sheet the rule<br />
// came from, to ensure that relative paths keep pointing to the right location.</p>
<p>// only parse a rule if it contains an interactive pseudo.<br />
var select = rule.selectorText;<br />
if(REG_INTERACTIVE.test(select)) {<br />
var style = rule.style.cssText,</p>
<p>// affected elements are found by truncating the selector after the interactive pseudo,<br />
// eg: &#8220;div li:hover&#8221; &gt;&gt;  &#8220;div li&#8221;<br />
affected = REG_AFFECTED.exec(select)[1],</p>
<p>// that pseudo is needed for a classname, and defines the type of interaction (focus, hover, active)<br />
// eg: &#8220;li:hover&#8221; &gt;&gt; &#8220;onhover&#8221;<br />
pseudo = select.replace(REG_PSEUDO, &#8216;on$1&#8242;),</p>
<p>// the new selector is going to use that classname in a new css rule,<br />
// since IE6 doesn&#8217;t support multiple classnames, this is merged into one classname<br />
// eg: &#8220;li:hover&#8221; &gt;&gt; &#8220;li.onhover&#8221;,  &#8220;li.folder:hover&#8221; &gt;&gt; &#8220;li.folderonhover&#8221;<br />
newSelect = select.replace(REG_SELECT, &#8216;.$2&#8242; + pseudo),</p>
<p>// the classname is needed for the events that are going to be set on affected nodes<br />
// eg: &#8220;li.folder:hover&#8221; &gt;&gt; &#8220;folderonhover&#8221;<br />
className = REG_CLASS.exec(newSelect)[1];</p>
<p>// no need to set the same callback more than once when the same selector uses the same classname<br />
var hash = affected + className;<br />
if(!this.callbacks[hash]) {</p>
<p>// affected elements are given an expression under a fake css property, the classname is used<br />
// because a unique name (eg &#8220;behavior:&#8221;) would be overruled (in IE6, not 7) by a following rule<br />
// selecting the same element. The expression does a callback to CSSHover.patch, rerouted via the<br />
// exposed window.CSSHover function.</p>
<p>// because the expression is added to the stylesheet, and styles are always applied to html that is<br />
// dynamically added to the dom, the expression will also trigger for those new elements (provided<br />
// they are selected by the affected selector).</p>
<p>sheet.addRule(affected, CSSHOVER_PREFIX + className + &#8216;:expression(CSSHover(this, &#8220;&#8216;+pseudo+&#8217;&#8221;, &#8220;&#8216;+className+&#8217;&#8221;))&#8217;);</p>
<p>// hash it, so an identical selector/class combo does not duplicate the expression<br />
this.callbacks[hash] = true;<br />
}</p>
<p>// duplicate expressions need not be set, but the style could differ<br />
sheet.addRule(newSelect, style);<br />
}<br />
},</p>
<p>// called via the expression, patches individual nodes<br />
patch:function(node, type, className) {</p>
<p>// the patch&#8217;s type is returned to the expression. That way the expression property<br />
// can be found and removed, to stop it from calling patch over and over.<br />
// The if will fail the first time, since the expression has not yet received a value.<br />
var property = CSSHOVER_PREFIX + className;<br />
if(node.style[property]) {<br />
node.style[property] = null;<br />
}</p>
<p>// just to make sure, also keep track of patched classnames locally on the node<br />
if(!node.csshover) node.csshover = [];</p>
<p>// and check for it to prevent duplicate events with the same classname from being set<br />
if(!node.csshover[className]) {<br />
node.csshover[className] = true;</p>
<p>// create an instance for the given type and class<br />
var element = new CSSHoverElement(node, type, className);</p>
<p>// and store that instance for unloading later on<br />
this.elements.push(element);<br />
}</p>
<p>// returns a dummy value to the expression<br />
return type;<br />
},</p>
<p>// unload stuff onbeforeunload<br />
unload:function() {<br />
try {</p>
<p>// remove events<br />
var l = this.elements.length;<br />
for(var i=0; i&lt;l; i++) {<br />
this.elements[i].unload();<br />
}</p>
<p>// and set properties to null<br />
this.elements = [];<br />
this.callbacks = {};</p>
<p>} catch (e) {<br />
}<br />
}<br />
};</p>
<p>// add the unload to the onbeforeunload event<br />
window.attachEvent(&#8217;onbeforeunload&#8217;, function(){<br />
CSSHover.unload();<br />
});</p>
<p>/**<br />
*    CSSHoverElement<br />
*    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
*/</p>
<p>// the event types associated with the interactive pseudos<br />
var CSSEvents = {<br />
onhover:  { activator: &#8216;onmouseenter&#8217;, deactivator: &#8216;onmouseleave&#8217; },<br />
onactive: { activator: &#8216;onmousedown&#8217;,  deactivator: &#8216;onmouseup&#8217; },<br />
onfocus:  { activator: &#8216;onfocus&#8217;,      deactivator: &#8216;onblur&#8217; }<br />
};</p>
<p>// CSSHoverElement constructor, called via CSSHover.patch<br />
function CSSHoverElement(node, type, className) {</p>
<p>// the CSSHoverElement patches individual nodes by manually applying the events that should<br />
// have fired by the css pseudoclasses, eg mouseenter and mouseleave for :hover.</p>
<p>this.node = node;<br />
this.type = type;<br />
var replacer = new RegExp(&#8217;(^|\\s)&#8217;+className+&#8217;(\\s|$)&#8217;, &#8216;g&#8217;);</p>
<p>// store event handlers for removal onunload<br />
this.activator =   function(){ node.className += &#8216; &#8216; + className; };<br />
this.deactivator = function(){ node.className = node.className.replace(replacer, &#8216; &#8216;); };</p>
<p>// add the events<br />
node.attachEvent(CSSEvents[type].activator, this.activator);<br />
node.attachEvent(CSSEvents[type].deactivator, this.deactivator);<br />
}</p>
<p>CSSHoverElement.prototype = {<br />
// onbeforeunload, called via CSSHover.unload<br />
unload:function() {</p>
<p>// remove events<br />
this.node.detachEvent(CSSEvents[this.type].activator, this.activator);<br />
this.node.detachEvent(CSSEvents[this.type].deactivator, this.deactivator);</p>
<p>// and set properties to null<br />
this.activator = null;<br />
this.deactivator = null;<br />
this.node = null;<br />
this.type = null;<br />
}<br />
};</p>
<p>/**<br />
*    Public hook<br />
*    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
*/</p>
<p>return function(node, type, className) {<br />
if(node) {<br />
// called via the css expression; patches individual nodes<br />
return CSSHover.patch(node, type, className);<br />
} else {<br />
// called ondomcontentready via the public:attach node<br />
CSSHover.init();<br />
}<br />
};</p>
<p>})();</p>
<p>// ]]&gt;<br />
&lt;/script&gt;</p></blockquote>
<p>Now we can test our css drop down menu. We should include .css file and hover.htc with our html page :</p>
<p>between &lt;head&gt;and &lt;/head&gt;  tag include both codes for example:</p>
<blockquote><p>&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; media=&#8221;screen&#8221;<br />
href=&#8221;style.css&#8221; /&gt;</p></blockquote>
<p>For good Internet explorer behaviour :</p>
<blockquote><p>&lt;!&#8211;[if IE]&gt;<br />
&lt;style type=&#8221;text/css&#8221; media=&#8221;screen&#8221;&gt;<br />
body {<br />
behavior: url(csshover.htc);<br />
font-size: 100%;<br />
}</p>
<p>#menu ul li {float: left; width: 100%;}<br />
#menu ul li a {height: 1%;}</p>
<p>#menu a, #menu h2 {<br />
font: bold 0.7em/1.4em arial, helvetica, sans-serif;<br />
}<br />
&lt;/style&gt;<br />
&lt;![endif]&#8211;&gt;</p></blockquote>
<p>open &lt;body&gt; tag and insert html :</p>
<blockquote><p>
&lt;div id=&#8221;menu&#8221;&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a class=&#8221;first&#8221; href=&#8221;"&gt;test &lt;/a&gt;</p>
<p>&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;ul&gt;<br />
&lt;li&gt;&lt;a  href=&#8221;#&#8221;&gt;test &#8211; second layer&lt;/a&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a  href=&#8221;"&gt;test&lt;/a&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/div&gt;</p></blockquote>
<p>Now you can make your drop down menu with any amount of amnus and links and your drop down menu will work fine with internet explorer.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinationproject.com/css-horizontal-drop-down-menu-tutorial/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Horizontal CSS menu</title>
		<link>http://penguinationproject.com/horisontal-css-menu</link>
		<comments>http://penguinationproject.com/horisontal-css-menu#comments</comments>
		<pubDate>Tue, 09 Jun 2009 16:08:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css horisontal menu]]></category>

		<guid isPermaLink="false">http://penguinationproject.com/?p=121</guid>
		<description><![CDATA[Hello, we will create today great horizontal CSS menu used at Youtube Video Collector website.
You can use this CSS code to create your horizontal menu. It works great with any browser.
/** MAIN-MENU */
#main-menu {
margin: 0px 0px 10px 0px;
text-transform: uppercase;
height: 55px;
}
#main-menu ul {
margin: 0 auto;
padding: 11px 0px 0px 7px;
list-style: none;
}
#main-menu li {
display: inline;
position: relative;
}
#main-menu a {
padding: [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-124" title="apple_green_fruit_240421_l" src="http://penguinationproject.com/wp-content/uploads/2009/06/apple_green_fruit_240421_l-300x300.jpg" alt="apple_green_fruit_240421_l" width="300" height="300" />Hello, we will create today great horizontal CSS menu used at <a href="http://youtubevideocollector.com" target="_blank">Youtube Video Collector</a> website.</p>
<p>You can use this CSS code to create your horizontal menu. It works great with any browser.</p>
<blockquote><p>/** MAIN-MENU */</p>
<p>#main-menu {<br />
margin: 0px 0px 10px 0px;<br />
text-transform: uppercase;<br />
height: 55px;</p>
<p>}</p>
<p>#main-menu ul {</p>
<p>margin: 0 auto;<br />
padding: 11px 0px 0px 7px;<br />
list-style: none;</p>
<p>}</p>
<p>#main-menu li {<br />
display: inline;<br />
position: relative;</p>
<p>}</p>
<p>#main-menu a {<br />
padding: 11px 15px 14px 15px;<br />
text-align:center;<br />
text-decoration: none;</p>
<p>color: #FFFFFF;</p>
<p>}</p>
<p>#main-menu a:hover {<br />
clear:both;<br />
background:#d73030;<br />
color: #ffffff;</p>
<p>}</p>
<p>#main-menu .first a {<br />
background: none;<br />
}</p></blockquote>
<p>And html code used to insert horizontal css menu  into your webpage :</p>
<blockquote><p>&lt;div id=&#8221;main-menu&#8221;&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&#8221;"&gt;first link&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;"&gt;second link&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>That&#8217;s it, this menu looks really good on youtube video collector website, it could be cool with your own website.</p>
<p>Good luck !</p>
]]></content:encoded>
			<wfw:commentRss>http://penguinationproject.com/horisontal-css-menu/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Best css font family combination</title>
		<link>http://penguinationproject.com/best-css-font-family-combination</link>
		<comments>http://penguinationproject.com/best-css-font-family-combination#comments</comments>
		<pubDate>Wed, 03 Jun 2009 00:31:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://penguinationproject.com/?p=81</guid>
		<description><![CDATA[Hello,
after lots of tutorials of website design we&#8217;ve chosen best css font combination , now our penguin websites are looks much better.
Check it out :
font-family: Arial, Helvetica, Tahoma, sans-serif;
Good luck coding and greetings from Pengland !


]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>after lots of tutorials of website design we&#8217;ve chosen best css font combination , now our penguin websites are looks much better.</p>
<p>Check it out :</p>
<blockquote><p><strong>font-family: Arial, Helvetica, Tahoma, sans-serif;</strong></p></blockquote>
<p>Good luck coding and greetings from Pengland !</p>
<blockquote><p><strong><br />
</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://penguinationproject.com/best-css-font-family-combination/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->