<?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>FaraJoomla Web Design and Development &#187; CSS</title>
	<atom:link href="http://www.farajoomla.com/category/blog/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.farajoomla.com</link>
	<description>FaraJoomla Web Design and Development</description>
	<lastBuildDate>Sat, 29 Oct 2011 17:49:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Cross-browser transparency</title>
		<link>http://www.farajoomla.com/2010/06/cross-browser-transparency-via-css/</link>
		<comments>http://www.farajoomla.com/2010/06/cross-browser-transparency-via-css/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 17:42:02 +0000</pubDate>
		<dc:creator>Faramarz</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.farajoomla.com/?p=365</guid>
		<description><![CDATA[How to do it? You can make any element transparent by using &#8220;opacity&#8221; property and a value the only thing is, this declration is treated totally differently in all browsers. With four separate declrations, you can cover all browsers and fortunately they don&#8217;t interfere with each other. In this example I&#8217;ve used 70% transparency: .transparent_element [...]]]></description>
			<content:encoded><![CDATA[<p>How to do it? You can make any element transparent by using &#8220;opacity&#8221; property and a value the only thing is, this declration is treated totally differently in all browsers. With four separate declrations, you can cover all browsers and fortunately they don&#8217;t interfere with each other. In this example I&#8217;ve used 70% transparency:</p>
<pre class="brush: css">
.transparent_element {
	-moz-opacity: 0.7;
	opacity: 0.7;
	-khtml-opacity: 0.7;
	filter:alpha(opacity=70);
}
</pre>
<p>Here is what each of these properties is for:</p>
<p><strong>-moz-opacity: 0.7;</strong><br />
This one is used to support old versions of the Mozilla browsers like Netscape.</p>
<p><strong>opacity: 0.7;</strong><br />
This is the current standard in CSS. It works  for all browsers supportting current standards such as  most versions of Firefox, Safari, and Opera. </p>
<p><strong>-khtml-opacity: 0.7;</strong><br />
This is for very old versions of Safari (1.x).</p>
<p><strong>filter:alpha(opacity=70);</strong><br />
And you need this one for our dear stupid IE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.farajoomla.com/2010/06/cross-browser-transparency-via-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Accordion with jQuery and CSS</title>
		<link>http://www.farajoomla.com/2010/05/accordion-with-jquery-and-css/</link>
		<comments>http://www.farajoomla.com/2010/05/accordion-with-jquery-and-css/#comments</comments>
		<pubDate>Mon, 24 May 2010 15:30:47 +0000</pubDate>
		<dc:creator>Faramarz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.farajoomla.com/?p=359</guid>
		<description><![CDATA[The jQuery accordion plugin works with nested lists or just nested divs. There are also some options available to specify the structure, the active element (to display at first) and to customize animation. This plugin will come in handy when you are dealing with orgonizing a good chuck of content. HTML Markup In this markup [...]]]></description>
			<content:encoded><![CDATA[<p>The jQuery accordion plugin works with nested lists or just nested divs. There are also some options available to specify the structure, the active element (to display at first) and to customize animation. </p>
<p>This plugin will come in handy when you are dealing with orgonizing a good chuck of content. </p>
<h2>HTML Markup</h2>
<p>In this markup I&#8217;m using nested divs, an &lt;h3&gt; is the heading of accordion items and a nested &lt;div class=&quot;container_accordion&quot;&gt; to show the content of each item.</p>
<pre class="brush: html">
&lt;h3 class=&quot;click_accordion&quot;&gt;&lt;a href=&quot;#&quot;&gt;Web Design&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;container_accordion&quot;&gt;
  &lt;div class=&quot;content_accordion&quot;&gt;
    &lt;h2&gt;Custom Website Designs&lt;/h2&gt;
    &lt;p&gt;If your looking for a fresh eye-catching custom website design then we can develop a professional high quality website for you which is designed to your exact specifications.&lt;/p&gt;
    &lt;p&gt;Great websites do not need to cost an arm and a leg. Our process is that of getting to know your business and proposing the best fit for you in terms of features and budget, while never compromising on quality. We simply enjoy creating beautiful websites. Find out more about our services.&lt;/p&gt;
    &lt;p&gt;Do you require a world class corporate site, a friendly welcoming community site, or even something just plain funky? Whatever your design requirements, our design and development team caters for all audiences and markets. We have a wide range of designers at our disposal all from a variety of different design backgrounds, offering you a unique and beautifully designed website. &lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<h2>CSS</h2>
<pre class="brush: css">
h3.click_accordion {
	padding: 0;
	margin: 0 0 5px 0;
	background: url(../images/h2-bg.png) no-repeat;
	height: 46px;	line-height: 46px;
	width: 500px;
	font-size: 2em;
	font-weight: bold;
	float: left;
}

h3.click_accordion a {
	color: #fff;
	text-decoration: none;
	display: block;
	padding: 0 0 0 35px;
}

h3.click_accordion a:hover {
	background: url(../images/h2-bg.png) no-repeat;
	background-position: 0 -46px;
}

h3.active {
	background-position: 0 -92px;
}

.container_accordion {
	margin: 0 0 5px;
	padding: 0;
	overflow: hidden;
	font-size: 1.2em;
	width: 498px;
	clear: both;
	background: #f0f0f0;
	border: 1px solid #d6d6d6;
	-webkit-border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-moz-border-radius: 5px;
	border-bottom-right-radius: 5px;
	border-bottom-left-radius: 5px;
}
.container_accordion .content_accordion {
	padding: 20px;
}
</pre>
<h2>Setting up jQuery</h2>
<p>You can download jQuery from the jQuery site, or you can use the hosted one on Google.</p>
<pre class="brush: javascript">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js&quot;&gt;&lt;/script&gt;
</pre>
<p>Directly after you called your jQuery, start a new &lt;script&gt; tag and start your code by using the $(document).ready event.</p>
<pre class="brush: javascript">
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){

//open/close settings -- set default
$(&#039;.container_accordion&#039;).hide(); //Hiding and closing the containers
$(&#039;.click_accordion:first&#039;).addClass(&#039;active&#039;).next().show(); //Add &quot;active&quot; class to first item, then show/open next container

//On/Click
$(&#039;.click_accordion&#039;).click(function(){
	if( $(this).next().is(&#039;:hidden&#039;) ) {
		$(&#039;.click_accordion&#039;).removeClass(&#039;active&#039;).next().slideUp();
		$(this).toggleClass(&#039;active&#039;).next().slideDown();
	}
	return false;
});

});
&lt;/script&gt;
</pre>
<p><a href="http://www.farajoomla.com/demos/jquery-accordion/" class="readmore"><span>View Demo</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.farajoomla.com/2010/05/accordion-with-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dropdown with jQuery and CSS</title>
		<link>http://www.farajoomla.com/2010/05/dropdown-mwith-jquery-and-css/</link>
		<comments>http://www.farajoomla.com/2010/05/dropdown-mwith-jquery-and-css/#comments</comments>
		<pubDate>Sun, 16 May 2010 21:42:37 +0000</pubDate>
		<dc:creator>Faramarz</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.farajoomla.com/?p=352</guid>
		<description><![CDATA[Here is a solution for a very simple drop down menu system. All you need is jQuery and these below few lines of JavaScript and CSS. The features of this menu system are: Unordered list as menu structure Absence of mouse events within html Timeout effect Cross-browser compatible (even IE 6) Multi-level and retains &#8220;trail&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a solution for a very simple drop down menu system. All you need is jQuery and these below few lines of JavaScript and CSS.</p>
<p>The features of this menu system are:</p>
<ul>
<li>Unordered list as menu structure</li>
<li> Absence of mouse events within html</li>
<li> Timeout effect</li>
<li> Cross-browser compatible (even IE 6)</li>
<li> Multi-level and retains &ldquo;trail&rdquo;</li>
<li> Easy to adopt styling</li>
<li> Minimal JavaScript</li>
</ul>
<h2>How to do it</h2>
<p>First thing you do is to include jQuery library (before &lt;/head&gt;)</p>
<pre class="brush: javascript">
&lt;script type=&#039;text/javascript&#039; src=&#039;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&#039;&gt;&lt;/script&gt;
</pre>
<p>I am using the jQuery library hosted on google codes, but you can download your own copy of jQuery and link it to your page.</p>
<p>Next step is to include the simple drop-down menu plugin. You can either include the code before &lt;/head&gt;, or save the code as an external JavaScript fine and include a link to it in your web page.</p>
<pre class="brush: javascript">
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){

    $(&quot;ul.dropdown li&quot;).hover(function(){

        $(this).addClass(&quot;hover&quot;);
        $(&#039;ul:first&#039;,this).css(&#039;visibility&#039;, &#039;visible&#039;);

    }, function(){

        $(this).removeClass(&quot;hover&quot;);
        $(&#039;ul:first&#039;,this).css(&#039;visibility&#039;, &#039;hidden&#039;);

    });

    $(&quot;ul.dropdown li ul li:has(ul)&quot;).find(&quot;a:first&quot;).append(&quot; &amp;amp;amp;amp;raquo; &quot;);

});
&lt;/script&gt;
</pre>
<p><strong>Note:</strong> if you are using as an external file, then you don&#8217;t need to enclose the code in  &lt;script type=&quot;text/javascript&quot;&gt; and &lt;/script&gt;.</p>
<p>Here is the HTML markup:</p>
<pre class="brush: html">
&lt;div id=&quot;page-wrap&quot;&gt;
        &lt;ul class=&quot;dropdown&quot;&gt;
        	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Business News&lt;/a&gt;
        		&lt;ul class=&quot;sub_menu&quot;&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Companies&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Economy&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;International&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Buzz&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;International&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Buzz&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;International&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Buzz&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Street Sweep&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Corrections&lt;/a&gt;&lt;/li&gt;
                     &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Street Sweep&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Corrections&lt;/a&gt;&lt;/li&gt;
					 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Economy&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;International&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Buzz&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;International&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Buzz&lt;/a&gt;&lt;/li&gt;
                            &lt;li&gt;&lt;a href=&quot;#&quot;&gt;International&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Buzz&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
        		&lt;/ul&gt;
        	&lt;/li&gt;
        	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Markets&lt;/a&gt;
        		&lt;ul class=&quot;sub_menu&quot;&gt;
        			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Pre-Market Training&lt;/a&gt;&lt;/li&gt;
        			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;After Hours Training&lt;/a&gt;&lt;/li&gt;
        			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;US Stocks&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Currencies&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Euro&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;US Dollar&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;British Pound&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Pre-Market Training&lt;/a&gt;&lt;/li&gt;
        			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;After Hours Training&lt;/a&gt;&lt;/li&gt;
        			&lt;li&gt;&lt;a href=&quot;#&quot;&gt;US Stocks&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Currencies&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Euro&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;US Dollar&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;British Pound&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
        		&lt;/ul&gt;
        	&lt;/li&gt;
        	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Personal Finance&lt;/a&gt;
        		&lt;ul class=&quot;sub_menu&quot;&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Money Magazine&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Real Estate&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Jobs&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Taxes&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Autos&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Jobs&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Taxes&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Autos&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Loan Center&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Best Places to Live&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Paris&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sweeden&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Ireland&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
					 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Money Magazine&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Real Estate&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Jobs&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Taxes&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Autos&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Jobs&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Taxes&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Autos&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Loan Center&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;
        				&lt;a href=&quot;#&quot;&gt;Best Places to Live&lt;/a&gt;
        				&lt;ul&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Paris&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sweeden&lt;/a&gt;&lt;/li&gt;
        					&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Ireland&lt;/a&gt;&lt;/li&gt;
        				&lt;/ul&gt;
        			 &lt;/li&gt;

        		&lt;/ul&gt;
        	&lt;/li&gt;
        	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Technology&lt;/a&gt;
        		&lt;ul class=&quot;sub_menu&quot;&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Apple&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Google&lt;/a&gt;
						 &lt;ul&gt;
						 	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Gchat&lt;/a&gt;&lt;/li&gt;
							&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Ad Server&lt;/a&gt;&lt;/li&gt;
							&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Analytics&lt;/a&gt;&lt;/li&gt;
						 &lt;/ul&gt;
					 &lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Techmate&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;TechTalk&lt;/a&gt;&lt;/li&gt;
        		&lt;/ul&gt;
        	&lt;/li&gt;
        	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Preferences&lt;/a&gt;
        		&lt;ul class=&quot;sub_menu&quot;&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Login&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Register&lt;/a&gt;&lt;/li&gt;
        			 &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Account&lt;/a&gt;&lt;/li&gt;
        		&lt;/ul&gt;
        	&lt;/li&gt;
        &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>And here is the CSS:</p>
<pre class="brush: css">
* 									{ margin: 0; padding: 0; }
#page-wrap							{ width: 100%; margin: 25px auto; }
a									{ text-decoration: none; }
ul									{ list-style: none; }
p                                   { margin: 15px 0; }
ul.dropdown                         { position: relative; }
ul.dropdown li                      { font-weight: bold; float: left; zoom: 1; background: #ccc; }
ul.dropdown a:hover		            { color: #000; }
ul.dropdown a:active                { color: #ffa500; }
ul.dropdown li a                    { display: block; padding: 4px 8px; border-right: 1px solid #333;
	 								  color: #222; }
ul.dropdown li:last-child a         { border-right: none; }
ul.dropdown li.hover,
ul.dropdown li:hover                { background: #F4B737; color: black; position: relative; }
ul.dropdown li.hover a              { color: black; }
ul.dropdown ul 						{ width: 220px; visibility: hidden; position: absolute; top: 100%; left: 0; }
ul.dropdown ul li 					{ font-weight: normal; background: #f6f6f6; color: #000;
									  border-bottom: 1px solid #ccc; float: none; }
ul.dropdown ul li a					{ border-right: none; width: 100%; display: inline-block; }
ul.dropdown ul ul 					{ left: 100%; top: 0; }
ul.dropdown li:hover &gt; ul 			{ visibility: visible; }
</pre>
<p>That&#8217;s it.</p>
<p><a href="http://www.farajoomla.com/demos/jquery-dropdown/" class="readmore"><span>View Demo</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.farajoomla.com/2010/05/dropdown-mwith-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conditional Stylesheets for IE</title>
		<link>http://www.farajoomla.com/2010/05/conditional-stylesheets-for-ie/</link>
		<comments>http://www.farajoomla.com/2010/05/conditional-stylesheets-for-ie/#comments</comments>
		<pubDate>Fri, 14 May 2010 02:32:52 +0000</pubDate>
		<dc:creator>Faramarz</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.farajoomla.com/?p=329</guid>
		<description><![CDATA[We all have dealt with IE issues and bugs but you don&#8217;t have to keep banging your head against the wall when you can fight with IE problems with conditional stylesheet. This way you can code hack-free and you don&#8217;t have to worry about how dangerous hacks will behave in future, you also get to [...]]]></description>
			<content:encoded><![CDATA[<p>We all have dealt with IE issues and bugs but you don&#8217;t have to keep banging your head against the wall when you can fight with IE problems with conditional stylesheet. This way you can code hack-free and you don&#8217;t have to worry about how dangerous hacks will behave in future, you also get to keep your main stylesheet clean and valid.</p>
<p>You can also use conditional tags for loading JavaScript and HTML or any other content or message in IE.</p>
<p>Conditional tags structure is the same as an HTML comment  (&lt;!&#8211; &#8211;&gt;) and all other browsers will see them as normal comments and will ignore them entirely but explorer Windows, has been programmed to recognize the special &lt;!&#8211;[if IE]&gt; syntax, resolves the if and parses the content of the conditional comment as if it were normal page content, bingo!</p>
<p><strong>Note:</strong> since conditional comments use the HTML comment structure, they can only be included in HTML files, and not in CSS files. You&#8217;d have preferred to put the special styles in the CSS file, but that&#8217;s impossible. You can also put an entire new &lt;link&gt; tag in the conditional comment referring to an extra style sheet.</p>
<h2>How it works?</h2>
<p>The code should go in the &lt;head&gt; section with all the other regular CSS &lt;link&gt; CSS files. Below are examples of different codes for different IE versions.</p>
<p><strong>Everytthing except IE</strong></p>
<pre class="brush: html">
&lt;!--[if !IE]&gt;&lt;!--&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;not-ie.css&quot; /&gt;
&lt;!--&lt;![endif]--&gt;
</pre>
<p><strong>Only IE 7</strong></p>
<pre class="brush: html">
&lt;!--[if IE 7]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie7.css&quot;&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>Only IE 6</strong></p>
<pre class="brush: html">
&lt;!--[if IE 6]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie6.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>Only IE 5</strong></p>
<pre class="brush: html">
&lt;!--[if IE 5]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie5.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>Only IE 5.5</strong></p>
<pre class="brush: html">
&lt;!--[if IE 5.5000]&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie55.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>Only IE 6 and lower</strong></p>
<pre class="brush: html">
&lt;!--[if lt IE 7]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie6-and-down.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<pre class="brush: html">
&lt;!--[if lte IE 6]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie6-and-down.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>IE 7 and lower</strong></p>
<pre class="brush: html">
&lt;!--[if lt IE 8]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie7-and-down.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<pre class="brush: html">
&lt;!--[if lte IE 7]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie7-and-down.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>IE 8 and lower</strong></p>
<pre class="brush: html">
&lt;!--[if lt IE 9]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie8-and-down.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<pre class="brush: html">
&lt;!--[if lte IE 8]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie8-and-down.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>IE and higher</strong></p>
<pre class="brush: html">
&lt;!--[if gt IE 5.5]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie6-and-up.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<pre class="brush: html">
&lt;!--[if gte IE 6]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie6-and-up.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>IE 7 and higher</strong></p>
<pre class="brush: html">
&lt;!--[if gt IE 6]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie7-and-up.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<pre class="brush: html">
&lt;!--[if gte IE 7]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie7-and-up.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>IE 8 and higher</strong></p>
<pre class="brush: html">
&lt;!--[if gt IE 7]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie8-and-up.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<pre class="brush: html">
&lt;!--[if gte IE 8]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ie8-and-up.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p><strong>ALL versions of IE</strong></p>
<pre class="brush: html">
&lt;!--[if IE]&gt;
	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;all-ie-only.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.farajoomla.com/2010/05/conditional-stylesheets-for-ie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

