<?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>TutorBoy &#187; CSS</title>
	<atom:link href="http://articles.tutorboy.com/topics/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://articles.tutorboy.com</link>
	<description>Log on to Techknowledgey</description>
	<lastBuildDate>Wed, 28 Mar 2012 11:04:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gmail style Scrollbar Using jQuery and CSS + MouseWheel</title>
		<link>http://articles.tutorboy.com/2012/02/29/gmail-style-scrollbar-using-jquery-and-css-mousewheel/</link>
		<comments>http://articles.tutorboy.com/2012/02/29/gmail-style-scrollbar-using-jquery-and-css-mousewheel/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 06:40:41 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[MouseWheel]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=3235</guid>
		<description><![CDATA[As per the request, here is an updated version of scrollbar with the Mouse Wheel feature. Now you can scroll using ...]]></description>
			<content:encoded><![CDATA[<p>As per the request, here is an updated version of <a title="Gmail style Scrollbar Using jQuery and CSS" href="http://articles.tutorboy.com/2011/11/14/gmail-style-scrollbar-using-jquery-and-css/">scrollbar</a> with the Mouse Wheel feature. Now you can scroll using the Mouse Wheel movement. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-3235"></span></p>
<p>Previous Version you can find <a title="Gmail style Scrollbar Using jQuery and CSS" href="http://articles.tutorboy.com/2011/11/14/gmail-style-scrollbar-using-jquery-and-css/">here</a>. and also applicable for this <a title="Facebook/Twitter style Scrollbar Using jQuery and CSS" href="http://articles.tutorboy.com/2011/11/10/facebook-twitter-style-scrollbar/">(Facebook/Twitter style Scrollbar Using jQuery and CSS)</a>.</p>
<p><a href="http://demo.tutorboy.com/articles/Gmail_style_Scrollbar_Using_jQuery_CSS_MouseWheel.html">View Demo</a></p>
<p>Here am updating the complete JavaScript.</p>
<h2>JavaScript</h2>
<pre class="brush:js">$(document).ready(function(){

    var _offsetY = 0,
    _startY = 0,
    scrollStep = 10,
    isScrollBarClick = false,
    contentDiv,
    scrubber,
    scrollHeight,
    contentHeight,
    scrollFaceHeight,
    initPosition,
    initContentPos,
    moveVal,
    scrubberY = 0;

    element = document.getElementById(&quot;updateHolder&quot;);
    if (element.addEventListener)
        /** DOMMouseScroll is for mozilla. */
        element.addEventListener(&#039;DOMMouseScroll&#039;, wheel, false);
    /** IE/Opera. */
    element.onmousewheel = document.onmousewheel = wheel;

	// To resize the height of the scroll scrubber when scroll height increases.
	setScrubberHeight();

	contentDiv = document.getElementById(&#039;updateContainer&#039;);

	scrubber = $(&#039;#updateScollScrubber&#039;);

	scrollHeight = $(&#039;#updateScollBar&#039;).outerHeight();

	contentHeight = $(&#039;#updateContent&#039;).outerHeight();

	scrollFaceHeight = scrubber.outerHeight();

    initPosition = 0;

	initContentPos = $(&#039;#updateHolder&#039;).offset().top;

	// Calculate the movement ration with content height and scrollbar height
	moveVal = (contentHeight - scrollHeight)/(scrollHeight - scrollFaceHeight);

	$(&#039;#updateHolder&#039;).bind(&#039;mousewheel&#039;, wheel);

	$(&quot;#updateScollScrubber&quot;).mouseover(function() {
		// Enable Scrollbar only when the content height is greater then the view port area.
		isScrollBarClick = false;
		if(contentHeight &gt; scrollHeight) {
			// Show scrollbar on mouse over
			$(this).animate({opacity: 1});
			scrubber.bind(&quot;mousedown&quot;, onMouseDown);
		}
	}).mouseout(function() {
	    isScrollBarClick = false;
		if(contentHeight &gt; scrollHeight) {
			// Hide Scrollbar on mouse out.
			$(this).animate({opacity: 0.25});
			$(&#039;#updateHolder&#039;).unbind(&quot;mousemove&quot;, onMouseMove);
		    scrubber.unbind(&quot;mousedown&quot;, onMouseDown);
		}
	});

    $(&quot;#updateScollBar&quot;).mousedown(function(){
        isScrollBarClick = true;
    }).mouseout(function(){
        isScrollBarClick = false;
    }).mouseup(function(event) {
        if( isScrollBarClick == false )
             return;
        if ((event.pageY - initContentPos) &gt; (scrollHeight - scrubber.outerHeight())) {
            scrubber.css({top: (scrollHeight - scrubber.outerHeight())});
        }else{
            scrubber.css({top: (event.pageY - initContentPos) - 5});
        }
        $(&#039;#updateContent&#039;).css({top: ((initContentPos - scrubber.offset().top) * moveVal)});
    });

	function onMouseDown(event) {
		$(&#039;#updateHolder&#039;).bind(&quot;mousemove&quot;, onMouseMove);
		$(&#039;#updateHolder&#039;).bind(&quot;mouseup&quot;, onMouseUp);
		_offsetY = scrubber.offset().top;
		_startY = event.pageY + initContentPos;
		// Disable the text selection inside the update area. Otherwise the text will be selected while dragging on the scrollbar.
		contentDiv.onselectstart = function () { return false; } // ie
		contentDiv.onmousedown = function () { return false; } // mozilla
	}

	function onMouseMove(event) {

        isScrollBarClick = false;
		// Checking the upper and bottom limit of the scroll area
		if((scrubber.offset().top &gt;= initContentPos) &amp;&amp; (scrubber.offset().top  (initContentPos + scrollHeight - scrollFaceHeight)) {
				scrubber.css({top: (scrollHeight-scrollFaceHeight-2)});
				$(&#039;#updateContent&#039;).css({top: (scrollHeight - contentHeight + initPosition)});
			}
			$(&#039;#updateHolder&#039;).trigger(&#039;mouseup&#039;);
		}
	}

	function onMouseUp(event) {
		$(&#039;#updateHolder&#039;).unbind(&quot;mousemove&quot;, onMouseMove);
		contentDiv.onselectstart = function () { return true; } // ie
		contentDiv.onmousedown = function () { return true; } // mozilla
	}

	function setScrubberHeight() {
		cH = $(&#039;#updateContent&#039;).outerHeight();
		sH = $(&#039;#updateScollBar&#039;).outerHeight();
		if(cH &gt; sH) {
			// Set the min height of the scroll scrubber to 20
			if(sH / ( cH / sH ) &lt; 20) { 				$(&#039;#updateScollScrubber&#039;).css({height: 20 }); 			}else{ 				$(&#039;#updateScollScrubber&#039;).css({height: sH / ( cH / sH ) }); 			} 		} 	} 	function onMouseWheel(dir) {         scrubberY = scrubber.offset().top + (scrollStep * dir) - initContentPos;         if ((scrubberY) &gt; (scrollHeight - scrubber.outerHeight())) {
            scrubber.css({top: (scrollHeight - scrubber.outerHeight())});
        }else {
            if(scrubberY &lt; 0) scrubberY = 0;
            scrubber.css({top: scrubberY});
        }
        $(&#039;#updateContent&#039;).css({top: ((initContentPos - scrubber.offset().top) * moveVal)});
	}

	/** This is high-level function.
	 * It must react to delta being more/less than zero.
	 */
	function handle(delta) {
	        if (delta &lt; 0) {
			    onMouseWheel(1);
	        }
	        else {
			    onMouseWheel(-1);
	        }
	}

	/** Event handler for mouse wheel event.
	 */
	function wheel(event){
	        var delta = 0;
	        if (!event) /* For IE. */
	                event = window.event;
	        if (event.wheelDelta) { /* IE/Opera. */
	                delta = event.wheelDelta/120;
	        } else if (event.detail) { /** Mozilla case. */
	                /** In Mozilla, sign of delta is different than in IE.
	                 * Also, delta is multiple of 3.
	                 */
	                delta = -event.detail/3;
	        }
	        /** If delta is nonzero, handle it.
	         * Basically, delta is now positive if wheel was scrolled up,
	         * and negative, if wheel was scrolled down.
	         */
	        if (delta)
	                handle(delta);
	        /** Prevent default actions caused by mouse wheel.
	         * That might be ugly, but we handle scrolls somehow
	         * anyway, so don&#039;t bother here..
	         */
	        if (event.preventDefault)
	                event.preventDefault();
	        event.returnValue = false;
	}

});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2012/02/29/gmail-style-scrollbar-using-jquery-and-css-mousewheel/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple CSS Selector In JavaScript</title>
		<link>http://articles.tutorboy.com/2012/02/16/simple-css-selector-in-javascript/</link>
		<comments>http://articles.tutorboy.com/2012/02/16/simple-css-selector-in-javascript/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 12:36:14 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Selectors]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=3217</guid>
		<description><![CDATA[Sometime you don&#8217;t wish to use JavaScript frameworks on simple web applications, but you hardly need a cross-browser CSS selector. ...]]></description>
			<content:encoded><![CDATA[<p>Sometime you don&#8217;t wish to use JavaScript frameworks on simple web applications, but you hardly need a cross-browser CSS selector. The following snippet help you to retrieve simple <code>ID</code>, <code>CLASS</code> notation and html <code>Tags</code>. This is a very basic version and you can contribute to this. <span id="more-3217"></span></p>
<pre class="brush:js">
// IDs and CLASS
$('#my_id, .css_class, .className, #another_id');
// HTML Tags
$('body, h1');
</pre>
<h1>JavaScript</h1>
<pre class="brush:js">

function $(selectors) {
	var result = new Array();
	if(!document.getElementsByTagName) return result;
	// Removing unwanted spaces
	selectors = selectors.replace(/\s*([^\w])\s*/g,"$1");
	// Extracting the selectors from the param
	selectors = selectors.split(",");
	// Store all dom elements
	var elements = document.getElementsByTagName('*');
	// Parse the selectors list
	for(var i = 0; (selector = selectors[i]) != null ; i++) {
		// If ID
		if(selector.indexOf("#") == 0) {
			selector = selector.split("#");
			result[result.length] = document.getElementById(selector[1]);
		}
		// If CLASS
		else if(selector.indexOf(".") == 0) {
			selector = selector.split(".");
			// If the browser support HTML 5
			if(document.getElementsByClassName) {
				result[result.length] = document.getElementsByClassName(selector[1]);
			}
			// for browsers such as IE
			else {
				var hasClassName = new RegExp("(?:^|\\s)" + selector[1] + "(?:$|\\s)");
				var element;
				// Parse all DOM elements
				for(var j = 0; (element = elements[j]) != null; j++ ) {
					if(element.className &#038;&#038; element.className.match(hasClassName)) {
						result[result.length] = element;	

					}
				}
			}
		}
		// If tag
		else {
			result[result.length] = document.getElementsByTagName(selector);
		}
	}
	return result;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2012/02/16/simple-css-selector-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS @font-face: Embedding Stylish Fonts in Websites</title>
		<link>http://articles.tutorboy.com/2011/07/05/embedding-stylish-fonts/</link>
		<comments>http://articles.tutorboy.com/2011/07/05/embedding-stylish-fonts/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 20:01:27 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Custom Fonts]]></category>
		<category><![CDATA[Font-Face]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2824</guid>
		<description><![CDATA[This is not  new method from CSS3, it was there before. The @font-face allows you to add your own fonts ...]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-2881 alignright" title="Embedding Stylish Fonts" src="http://articles.tutorboy.com/content/uploads/2011/07/Embedding_Stylish_Fonts.jpg" alt="" width="326" height="170" />This is not  new method from CSS3, it was there before. The <code>@font-face</code> allows you to add your own fonts to styles. <code>@font-face</code> is a quite easy to implement, only two params are important. ie Name of the font-family, and font path or embed code. It will work on all major browsers(including all version of IE). <span id="more-2824"></span>You can be able to add any kind of font types in <code>@font-face</code>, such as .eot, .ttf, .otf.</p>
<h2>Syntax</h2>
<pre class="brush:css">@font-face {
  font-family: &lt;a-remote-font-name&gt;;
  src: &lt;source&gt; [,&lt;source&gt;]*;
  [font-weight: &lt;weight&gt;];
  [font-style: &lt;style&gt;];
}</pre>
<p><a title="Demo: CSS @font-face  Embedding Stylish Fonts in Websites" href="http://demo.tutorboy.com/articles/Embedding_Stylish_Fonts.html" target="_blank">View Demo</a></p>
<h2>Example</h2>
<pre class="brush:css">@font-face {
    font-family: "Katy Berry";
    font-style: normal;
    font-weight: 400;
    src: url("kberry.ttf");
}</pre>
<p>Here, the &#8220;Katy Berry&#8221; font is embedded in you style sheet. So you can choose this name name in you css class/id like</p>
<pre class="brush:css">@font-face {
    font-family: "Katy Berry";
    font-style: normal;
    font-weight: 400;
    src: url("kberry.ttf");
}
.my-font-class2 {
	font-family: "Katy Berry";
}</pre>
<p>You can include any font format in url format or embed format. The url including method is showing above, next is embedding font data.</p>
<pre class="brush:css">@font-face {
    font-family: "Bleeding Cowboys";
    font-style: normal;
    font-weight: 400;
    src: url("data:font/truetype;base64,&lt;base64 code of font&gt;");
}</pre>
<p><code>data:font/truetype;base64</code> means that the base64 embed code is a font of turetype, and if you want to use opentype use like this <code>data:font/opentype;base64</code>. You can choose either of the two methods.</p>
<p>I think you can convert your font filed to base64 here <a href="http://www.opinionatedgeek.com/dotnet/tools/base64encode/" target="_blank">http://www.opinionatedgeek.com/dotnet/tools/base64encode/</a>.</p>
<p><a title="Demo: CSS @font-face  Embedding Stylish Fonts in Websites" href="http://demo.tutorboy.com/articles/Embedding_Stylish_Fonts.html" target="_blank">View Demo</a></p>
<p>Reference: <a href="https://developer.mozilla.org/en/css/@font-face" target="_blank">https://developer.mozilla.org/en/css/@font-face</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/07/05/embedding-stylish-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS: Pure CSS3 Pop Ups</title>
		<link>http://articles.tutorboy.com/2011/06/21/pure-css3-pop-ups/</link>
		<comments>http://articles.tutorboy.com/2011/06/21/pure-css3-pop-ups/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 10:44:42 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[CSS Menus]]></category>
		<category><![CDATA[CSS POP-Up]]></category>
		<category><![CDATA[CSS ToolTips]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2871</guid>
		<description><![CDATA[The mouse over pop-up feature without using JavaScript, but its just a CSS rule. Here I use CSS3 codes only ...]]></description>
			<content:encoded><![CDATA[<p>The mouse over pop-up feature without <a href="http://demo.tutorboy.com/articles/pure_css_popup.html"><img class="alignright size-medium wp-image-2874" title="pure css popups" src="http://articles.tutorboy.com/content/uploads/2011/06/pure-css-popups-300x199.png" alt="" width="264" height="176" /></a>using JavaScript, but its just a CSS rule. Here I use CSS3 codes only for shadow and corner curving. All other POP-Up functions are made up in CSS. This is about just hide and show contents on a HOVER action. You can use this as a POP-Up or ToolTip feature.<span id="more-2871"></span></p>
<p><a title="Pure CSS PopUp - TutorBoy" href="http://demo.tutorboy.com/articles/pure_css_popup.html" target="_blank">View Demo</a></p>
<p><strong>Step 1: </strong>Create your menus using anchor tag and wrap everything into a div element.</p>
<pre class="brush:html">&lt;div id="menu_container"&gt;

	&lt;a href="javascript:void(0);"&gt;Tutorboy&lt;/a&gt;
	&lt;a href="javascript:void(0);"&gt;Google&lt;/a&gt;
	&lt;a href="javascript:void(0);"&gt;Yahoo&lt;/a&gt;
	&lt;a href="javascript:void(0);"&gt;Twitter&lt;/a&gt;
	&lt;a href="javascript:void(0);"&gt;Facebook&lt;/a&gt;

&lt;/div&gt;
</pre>
<p><strong>Step 2: </strong>Write CSS to get good look and feel for the anchor tags.</p>
<pre class="brush:css">
#menu_container {
	position:relative;
	padding: 10px;
	background: #fff;
	margin: 100px auto;
	width:480px;
	}
	#menu_container a {
		display: inline;
		padding: 8px;
		text-decoration: none;
		color: white;
		background: #CC6633;
		/* for rounded corner */
		border-radius: 5px 5px;
		-moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		margin-right: 5px;
	}
	#menu_container a:hover {
		background: #B17C30;
		text-decoration: none;
	}
</pre>
<p>; </p>
<p><strong>Step 3: </strong>Next, to add you pop up contents inside each anchor tag. Here I added a span and put all the popup contents inside that. </p>
<pre class="brush:html">&lt;a href="javascript:void(0);"&gt;Tutorboy&lt;span&gt;http://tutorboy.com&lt;br/&gt;Online Complete Reference.&lt;/span&gt;&lt;/a&gt;
		&lt;a href="javascript:void(0);"&gt;Google&lt;span&gt;http://google.com&lt;br/&gt;Search the world's information, including webpages, images, videos and more..&lt;/span&gt;&lt;/a&gt;
		&lt;a href="javascript:void(0);"&gt;Yahoo&lt;span&gt;http://www.yahoo.com&lt;br/&gt;the world's most visited home page. Quickly find what you're searching..&lt;/span&gt;&lt;/a&gt;
		&lt;a href="javascript:void(0);"&gt;Twitter&lt;span&gt;http://www.twitter.com&lt;br/&gt;Social networking and microblogging service utilising instant messaging, SMS or a web interface.&lt;/span&gt;&lt;/a&gt;
		&lt;a href="javascript:void(0);"&gt;Facebook&lt;span&gt;http://www.facebook.com&lt;br/&gt;Facebook is a social utility that connects people with friends and others who ...&lt;/span&gt;&lt;/a&gt;
</pre>
<p><strong>Step 4: </strong>Then again write the CSS for the span and it&#8217;s hover</p>
<pre class="brush:css">	#menu_container a span {
		display: none;
		padding: 10px;
		border: 2px solid #F9E98E;
		background: #FBF7AA;
		color: #B17C30;

		/* for rounded corner and shadow */
		border-radius: 5px 5px;
		-moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
		-webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
		-moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
	}

	#menu_container a:hover span {
		display: inline;
		position: absolute;
		top: 80px;
		left: 450px;
	}
</pre>
<p>Ah, You Have Made It!</p>
<p><a title="Pure CSS PopUp - TutorBoy" href="http://demo.tutorboy.com/articles/pure_css_popup.html" target="_blank">View Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/06/21/pure-css3-pop-ups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Pseudo-classes and Pseudo-elements</title>
		<link>http://articles.tutorboy.com/2011/03/07/css3-pseudo-classes-and-pseudo-elements/</link>
		<comments>http://articles.tutorboy.com/2011/03/07/css3-pseudo-classes-and-pseudo-elements/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 21:42:11 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[::after]]></category>
		<category><![CDATA[::before]]></category>
		<category><![CDATA[::first-letter]]></category>
		<category><![CDATA[::first-line]]></category>
		<category><![CDATA[CSS Reference]]></category>
		<category><![CDATA[CSS3 Selectors]]></category>
		<category><![CDATA[Pseudo-classes]]></category>
		<category><![CDATA[Pseudo-elements]]></category>
		<category><![CDATA[Selectors]]></category>
		<category><![CDATA[Structural pseudo-classes]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2649</guid>
		<description><![CDATA[Pseudo-classes
In CSS the Pseudo Class are introduced to select elements , the elements which can&#8217;t be select with simple selectors. ...]]></description>
			<content:encoded><![CDATA[<h2><a rel="attachment wp-att-2689" href="http://articles.tutorboy.com/2011/03/07/css3-pseudo-classes-and-pseudo-elements/css3-selectors/"><img class="size-thumbnail wp-image-2689 alignright" title="css3.selectors" src="http://articles.tutorboy.com/content/uploads/2011/03/css3.selectors-150x140.jpg" alt="" width="150" height="140" /></a>Pseudo-classes</h2>
<p>In CSS the Pseudo Class are introduced to select elements , the elements which can&#8217;t be select with simple selectors. ie the normal selectors are <strong>#element-id</strong>, <strong>.class-name</strong> and <strong>*</strong> etc. Instead of that if we want to apply a style/property to and hover item, or focused item in the DOM, we use the &#8220;colon&#8221; (<strong><code>:</code></strong>) operator like <strong><em>#menuItem:hover</em></strong><em> </em>.</p>
<p>A pseudo-class always consists of a &#8220;colon&#8221; (<code>:</code>)    followed by the name of the pseudo-class and optionally by a value between    parentheses. <span id="more-2649"></span>Pseudo-class names are case-insensitive.Pseudo-classes may be dynamic, in the    sense that an element may acquire or lose a pseudo-class while a user    interacts with the document.</p>
<h2>Pseudo-elements</h2>
<p>A pseudo-element is made of two colons (<strong><code>::</code></strong>) followed by the    name of the pseudo-element. Pseudo-elements create abstractions about the document, for instance if you want to select the first letter of an elements content. then we <strong>apply ::first-letter </strong>on that elements. And many other like <strong>::first-line</strong>, <strong>::before</strong> and <strong>::after</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/03/07/css3-pseudo-classes-and-pseudo-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jsFiddle &#8211;  An Online Editor for JavaScripts, HTML5 and CSS3</title>
		<link>http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/</link>
		<comments>http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 05:35:19 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Mootools]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Reference]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript Framework]]></category>
		<category><![CDATA[jQuery Plug-in]]></category>
		<category><![CDATA[jsfiddle]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2652</guid>
		<description><![CDATA[Recently I was thinking about to design a Live editor for CSS and HTML, while googling I found an amazing ...]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2657" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-home-screen2/"><img class="size-thumbnail wp-image-2657 alignleft" title="jsfiddle.home.screen2" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.home_.screen2-150x150.png" alt="" width="150" height="150" /></a>Recently I was thinking about to design a Live editor for CSS and HTML, while googling I found an amazing tool. There you can edit CSS3, HTML5 and JavaScript. Not only JavaScript, we can load other popular libs like jQuery, mootools, dojo etc. You can use their API on your site. <a title="jsFiddle - Online Editor for the Web (JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML, CSS)" href="http://http://jsfiddle.net/" target="_blank">JsFiddle </a>is a playground for web developers, a tool which may be used in many ways. <span id="more-2652"></span>One can use it as an online editor for snippets build from HTML, CSS and JavaScript. The code can then be shared with others, embedded on a blog, etc.</p>
<p>I&#8217;m very much curious about the flow/working of the tool, so  I did <a title="MouseOver Auto Scroller Menu Using jQuery and CSS" href="http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/" target="_blank">MouseOver Auto Scroller Menu Using jQuery and CSS</a> in  <a href="http://jsfiddle.net/Xr9Ua/1/" target="_blank">Here you find the codes in JsFiddle</a>. The screens gives you the steps which I followed.</p>
<p>&nbsp;</p>
<div id="attachment_2660" class="wp-caption alignnone" style="width: 374px"><a rel="attachment wp-att-2660" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-screen1/"><img class="size-medium wp-image-2660" title="jsfiddle.screen1" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.screen1-300x261.png" alt="" width="364" height="315" /></a><p class="wp-caption-text">Editor Window</p></div>
<p>&nbsp;</p>
<div id="attachment_2658" class="wp-caption alignleft" style="width: 178px"><a rel="attachment wp-att-2658" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-javascript-select-screen3/"><img class="size-medium wp-image-2658" title="jsfiddle.javascript.select.screen3" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.javascript.select.screen3-168x300.png" alt="" width="168" height="300" /></a><p class="wp-caption-text">Choosing JavaScript libs</p></div>
<div id="attachment_2655" class="wp-caption alignleft" style="width: 178px"><a rel="attachment wp-att-2655" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-adding-other-resource-screen4/"><img class="size-medium wp-image-2655" title="jsfiddle.adding.other.resource.screen4" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.adding.other_.resource.screen4-168x300.png" alt="" width="168" height="300" /></a><p class="wp-caption-text">Adding external resource files</p></div>
<div id="attachment_2656" class="wp-caption alignleft" style="width: 403px"><a rel="attachment wp-att-2656" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-complete-screen7/"><img class="size-medium wp-image-2656" title="jsfiddle.complete.screen7" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.complete.screen7-300x261.png" alt="" width="393" height="341" /></a><p class="wp-caption-text">The Editor View</p></div>
<div id="attachment_2659" class="wp-caption alignleft" style="width: 409px"><a rel="attachment wp-att-2659" href="http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/jsfiddle-result-screen5/"><img class="size-medium wp-image-2659" title="jsfiddle.result.screen5" src="http://articles.tutorboy.com/content/uploads/2011/03/jsfiddle.result.screen5-300x146.png" alt="" width="399" height="194" /></a><p class="wp-caption-text">Result </p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Hope you would enjoy this tool.<br />
 <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/03/04/jsfiddle-an-online-editor-for-javascripts-html5-and-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accordion Menu Using CSS</title>
		<link>http://articles.tutorboy.com/2011/03/02/accordion-menu-using-css/</link>
		<comments>http://articles.tutorboy.com/2011/03/02/accordion-menu-using-css/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 00:39:07 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Accordion Menu]]></category>
		<category><![CDATA[CSS Menus]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Menus]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2637</guid>
		<description><![CDATA[Here is an example for CSS menu creation without using JavaScripts. The Accordion menu is simply made up withCSS2 and ...]]></description>
			<content:encoded><![CDATA[<p>Here is an example for CSS menu creation without using JavaScripts. <a rel="attachment wp-att-2640" href="http://articles.tutorboy.com/2011/03/02/accordion-menu-using-css/accordion-menu-using-css-screen/"><img class="alignright size-full wp-image-2640" title="Accordion Menu Using CSS.screen" src="http://articles.tutorboy.com/content/uploads/2011/03/Accordion.Menu_.Using_.CSS.screen.png" alt="" width="277" height="140" /></a>The Accordion menu is simply made up withCSS2 and for some other gradient effects I just use CSS3 also. Each menu item is enclosed in div called accordion, and each menu item is a group of menu and its content. First we set all the menu items overflow <span id="more-2637"></span>property as hidden, then simple increase the height on mouse over css. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><a href="http://demo.tutorboy.com/articles/Accordion.Menu.Using.CSS.html" target="_blank">View Demo</a></p>
<h2>HTML</h2>
<pre class="brush:html">&lt;div id="accordion"&gt;
    &lt;div&gt;
        &lt;h6&gt;Home&lt;/h6&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h6&gt;Demos and Downloads&lt;/h6&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h6&gt;About Us&lt;/h6&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;h6&gt;Contact Us&lt;/h6&gt;
        &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<h2>CSS</h2>
<pre class="brush:css">#accordion div{
	font: 12px Arial, Verdana, sans-serif;
	color:#424242;
	background: #fff;
	padding: 10px;
	width: 500px;
	overflow: hidden;
	height:25px;

}
#accordion div p{
	padding:0 10px;
}
#accordion div h6{
	font: 12px Arial, Verdana, sans-serif;
	text-shadow: 1px 1px 1px #d4d4d4;
	color:#424242;
	cursor:pointer;
	margin:0;
	padding:10px 10px;
	background: #8f8f8f;
	background: -moz-linear-gradient( top, #cecece, #8f8f8f); /* FF, Flock */
	background: -webkit-gradient(linear, left top, left bottom, from(#cecece), to(#8f8f8f)); /* Safari, Chrome */
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffcecece, endColorstr=#ff8f8f8f); /* IE 5.5 - IE 7 */
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffcecece, endColorstr=#f8f8f8f)";   /* IE 8 */
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	font-weight:bold;
}
#accordion div:hover {
	height:100px;
}
#accordion div:hover h6 {
	color:#424242;
	font-weight:bold;
	background: #2288dd;
	background: -moz-linear-gradient( top, #6bb2ff, #2288dd);
	background: -webkit-gradient(linear, left top, left bottom, from(#6bb2ff), to(#2288dd));
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff6bb2ff, endColorstr=#ff2288dd);
	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff6bb2ff, endColorstr=#ff2288dd)";
	color:#FFF;
	text-shadow: 1px 1px 1px #2288dd;
}
</pre>
<p>Hope you would understand the logic used in css, just drop yours comments at the bottom.</p>
<p>Thanks!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2011/03/02/accordion-menu-using-css/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>MouseOver Auto Scroller Menu Using jQuery and CSS</title>
		<link>http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/</link>
		<comments>http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 06:03:05 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Auto Scroller Menu]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery Listing]]></category>
		<category><![CDATA[Jquery Menu]]></category>
		<category><![CDATA[Js]]></category>
		<category><![CDATA[Menus]]></category>
		<category><![CDATA[MouseOver]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2524</guid>
		<description><![CDATA[On Mouse Over auto stroller menu using  jQuery and CSS. The menu is build with ul li elements, menus are ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://articles.tutorboy.com/jquery/mouseover-auto-scroller-menu-using-jquery-and-css.html"><img class="alignright size-full wp-image-2528" title="auto_slider_menu" src="http://articles.tutorboy.com/content/uploads/2010/10/auto_slider_menu.jpg" alt="auto slider menu image" width="286" height="144" /></a>On Mouse Over auto stroller menu using  jQuery and CSS. The menu is build with <em><strong>ul li</strong></em> elements, menus are arranged on a menu_holder div and it will shows only a limited number of menus at the menu area. Rest of them are visible while mouse move on the menu area. <span id="more-2524"></span>All the menus will slide top to bottom, and bottom-top according to the up and downward movement of the mouse. The scroll function enabled only when the height of the ul li greater than the menu holder.</p>
<p><a class="wp-caption" href="http://articles.tutorboy.com/content/mouseover-auto-scroller-menu-using-jquery-and-css.html" target="_self">View Demo</a> <a class="wp-caption" href="http://downloads.tutorboy.com/articles/jquery_mouseover_auto_scroller.zip" target="_self">Download Source<br />
</a></p>
<h2>CSS</h2>
<pre class="brush:css">&lt;style&gt;
body{font: normal normal normal 15px/normal arial, sans-serif;margin:0 auto;}
#container{
	width:250px; /* Width and Height you can change */
	height:108px; /* Height of the menu container, 4 li elements, each li have 27px height so total 108*/
	padding:10px;
	border:1px solid #ccc;
	border-radius : 5px;
	-moz-border-radius : 5px;
	-webkit-border-radius : 5px;
	background:#CCC;
	font-family: sans-serif, Verdana, Arial;
	margin:0 auto;
}
#menu_holder{
	margin:0;
	padding:0;
	background:#FFF;
	overflow:hidden; /* make the overflow as hidden, like a mask layer*/
	height:108px; /* Height of the menu holder, same as the container*/
	position:fixed;
	width:250px;
}
#slider {
	list-style-type:none;
	margin:0;
	padding:0;
	position:absolute;
	width:250px;
}
#slider li{
	background:#0FF;
	padding:3px;
	border-bottom:1px solid #262626;
	background : #000;
	color:#92B3DE;
	text-align:center;
}
#slider li:hover{
	color:#FFF;
	background:#2A2A2A;
	cursor:pointer;
}
&lt;/style&gt;</pre>
<h2>HTML</h2>
<p>The Menu holder contains all the menu items. We set the holder <strong>height </strong>as a fixed(but you can change) , from my example I set it as 108px so I can accommodate 4 menus in the menu holder. Each menu having 27px height and total 27&#215;5 = 108. If you wanna include more menus inside the holder just calculate the height with your <strong>li&#8217;</strong>s height.  Set the <strong>menu holder</strong> div&#8217;s <strong>overflow </strong>property as <strong>hidden</strong>, so that if the menu height increases then the rest of the entries will not shown, that is the logic behind. By moving mouse over to the menu holder the <strong>slider </strong>div&#8217;s <strong>top</strong> value will increase and decrease by the up/down mouse movement.  The menu holder will act as a mask layer over the <strong>UL LI</strong>. So it smoothly slide inside the menu_holder div <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush:html">&lt;div id="container"&gt;
    &lt;div id="menu_holder"&gt;
        &lt;ul id="slider"&gt;
            &lt;li&gt;Menu Content 1&lt;/li&gt;
            &lt;li&gt;Menu Content 2&lt;/li&gt;
            &lt;li&gt;Menu Content 3&lt;/li&gt;
            &lt;li&gt;Menu Content 4&lt;/li&gt;
            &lt;li&gt;Menu Content 5&lt;/li&gt;
            &lt;li&gt;Menu Content 6&lt;/li&gt;
            &lt;li&gt;Menu Content 7&lt;/li&gt;
            &lt;li&gt;Menu Content 8&lt;/li&gt;
            &lt;li&gt;Menu Content 9&lt;/li&gt;
            &lt;li&gt;Menu Content 10&lt;/li&gt;
            &lt;li&gt;Menu Content 11&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<p>Then you need <a href="http://code.google.com/apis/libraries/devguide.html#jquery">jQuery </a>lib file and jQuery easing plugin file. Download the easing plugin from <a href="http://gsgd.co.uk/sandbox/jquery/easing/">here</a>. The easing plug-in is optional, if you don&#8217;t want to use the easing effect try the commented code inside the script section.</p>
<h2>JavaScript Files</h2>
<pre class="brush:js">&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="jquery.easing.1.3.js"&gt;&lt;/script&gt;</pre>
<h2>jQuery</h2>
<p>Here is the complete script for the slider function. We trigger the mouse event for the menu holder div, and calculate the offset Y of the menu holder from the current mouse Y. And finally apply the values into the equation. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush:js">$(document).ready(function() {
	// hover color change effect
	$("#slider li").hover(function() {
		$(this).animate({opacity: 0.90}, 100, function(){
			$(this).animate({opacity: 1}, 0);
		} );
	});
	// Trigger mouse move event over the 'menu_holder'.
	$("#menu_holder").mousemove(function(e) {
		// Enable scroll function only when the height of the 'slider' or menu is greater than the 'menu_holder'.
		if($(this).height() &lt; $("#slider").height()) {
			// Calculate the distance value from the 'menu_holder' y pos and page Y pos.
			var distance = e.pageY - $(this).offset().top;
			// Get the percentage value with respect to the Mouse Y on the 'menu_holder'.
			var percentage = distance / $(this).height();
			// Calculate the new Y position of the 'slider'.
			var targetY = -Math.round(($("#slider").height() - $(this).height()) * percentage);
			// With jQuery easing funtion from easing plugin.
			$('#slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
			// Without easeing function. by default jQuery have 'swing'.
			//$('#slider').animate({top: [targetY+"px", "easeOutCirc"]}, { queue:false, duration:200 });
		}
	});
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/10/05/mouseover-auto-scroller-menu-using-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Resize Images In Same Quality Using CSS Properties</title>
		<link>http://articles.tutorboy.com/2010/09/13/resize-images-in-same-quality/</link>
		<comments>http://articles.tutorboy.com/2010/09/13/resize-images-in-same-quality/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 07:54:13 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Reference]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[Firefox (Gecko)]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Image Resize]]></category>
		<category><![CDATA[Microsoft MSDN]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari (WebKit)]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2439</guid>
		<description><![CDATA[We will lose the image quality while re-sizing it from the original size to up-scaled or down-scaled. The browsers default ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">We will lose the image quality while re-sizing it from the <a href="../css/resize-images-in-same-quality.html"><img class="alignright size-full wp-image-2453" title="imhg_quality_demo" src="../content/uploads/2010/09/imhg_quality_demo.jpg" alt="" width="185" height="207" /></a>original size to up-scaled or down-scaled. The browsers default quality is OK, but still we can improve by using CSS properties like<code> image-rendering, -ms-interpolation-mode</code>. The above properties provide a hint to the user agent about how to handle the image rendering, then the image will be up-scaled (or down-scaled) to the new dimensions using the specified algorithm. The two algorithms are <em>bilinear</em>(High<span id="more-2439"></span> Quality)<em> </em>re-sampling and <em>nearest neighbor</em> re-sampling(Low Quality). <code>-ms-interpolation-mode</code> is used by Internet Explorer and for Firefox (Gecko) <code>image-rendering</code>.</p>
<p style="text-align: justify;"><a class="wp-caption" href="http://articles.tutorboy.com/content/resize-images-in-same-quality.html" target="_blank">View Demo</a></p>
<p>You can use the CSS Properties as shown below.</p>
<h2>CSS</h2>
<pre class="brush:css">#lowQualityImg { 
 image-rendering: -moz-crisp-edges;   /* Firefox */
 -ms-interpolation-mode: nearest-neighbor;   /* IE */
 }
 #heighQualityImg{
 image-rendering: optimizeQuality;  /* Firefox 3.6+; default behavior is identical, no need to specify */
 -ms-interpolation-mode: bicubic;   /* Internet Explorer 7.0; default in IE8+ */
 }</pre>
<blockquote><p>Currently auto and optimizeQuality are equal by default, both result in bilinear resampling.<br />
Currently optimizeSpeed and -moz-crisp-edges are equal, both result in nearest neighbor resampling.</p></blockquote>
<h2>Browser compatibility</h2>
<table border="1">
<tbody>
<tr>
<th>Browser</th>
<th>Lowest version</th>
<th>Support of</th>
</tr>
<tr>
<td>Internet Explorer</td>
<td><strong>7.0</strong></td>
<td><code>-ms-interpolation-mode: bicubic | nearest-neighbor</code></p>
<ul>
<li>applies only to images (JPG, GIF, PNG, &#8230;)</li>
<li>in IE7 only for images without transparency</li>
<li>does not inherit</li>
<li>default value IE7:<code> nearest-neighbor </code>(low quality)</li>
<li>default value IE8+:<code> bicubic </code>(high quality)</li>
</ul>
</td>
</tr>
<tr>
<td>Firefox (Gecko)</td>
<td><strong>3.6</strong> (1.9.2)</td>
<td><code>image-rendering: auto | inherit | optimizeSpeed | optimizeQuality | -moz-crisp-edges </code></td>
</tr>
<tr>
<td>Opera</td>
<td>&#8212;</td>
<td>&#8212;</td>
</tr>
<tr>
<td>Safari (WebKit)</td>
<td>&#8212;</td>
<td>&#8212;</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/09/13/resize-images-in-same-quality/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery Notification Message like StackOverflow</title>
		<link>http://articles.tutorboy.com/2010/09/10/jquery-notification-message-like-stackoverflow/</link>
		<comments>http://articles.tutorboy.com/2010/09/10/jquery-notification-message-like-stackoverflow/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 10:47:28 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Js]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2423</guid>
		<description><![CDATA[Here is the source code of the notification message like in stackoverflow. Make it easy with jQuery  and CSS. Place ...]]></description>
			<content:encoded><![CDATA[<p>Here is the source code of the notification message like in stackoverflow. Make it easy with jQuery  and CSS. Place all your notification messages inside a div and apply CSS propertie<a href="../jquery/jquery-notification-message-like-stackoverflow.html"><img class="size-full wp-image-2426 alignright" title="Notification" src="../content/uploads/2010/09/Notification.jpg" alt="" width="315" height="109" /></a>s <code>position:fixed;top:0px;left:0px; </code> And place the close button with the span and a elements. <span id="more-2423"></span>&lt;span&gt;&lt;a title=&#8221;dismiss this notification&#8221;&gt;x&lt;/a&gt;&lt;/span&gt;. Hide the div element <code>display: none;</code>. and use jQuery to apply fadeIn and fadeOut. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><a class="wp-caption" href="http://articles.tutorboy.com/content/jquery-notification-message.html" target="_blank">View Demo</a></p>
<h2>HTML</h2>
<pre class="brush:html">&lt;div id="notification" style="display: none;"&gt;
 Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
 &lt;span class="dismiss"&gt;&lt;a title="dismiss this notification"&gt;x&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;</pre>
<h2>CSS</h2>
<pre class="brush:css">#notification {
    font-family:Arial,Helvetica,sans-serif;
    position:fixed;
    top:0px;
    left:0px;
    width:100%;
    z-index:105;
    text-align:left;
    font-weight:normal;
    font-size:100%;
    color:white;
    background-color:#000;
    padding:5px;
}
#notification span.dismiss {
    border:2px solid #FFF;
    padding:0 5px;
    cursor:pointer;
    float:right;
    margin-right:10px;
}
#notification a {
    color:white;
    text-decoration:none;
    font-weight:bold
}</pre>
<h2>jQuery</h2>
<pre class="brush:js">&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
$(document).ready(function() {
    $("#notification").fadeIn("slow");
    $(".dismiss").click(function(){
	$("#notification").fadeOut("slow");
    });
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/09/10/jquery-notification-message-like-stackoverflow/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

