<?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>Dev&#039;s Point</title>
	<atom:link href="http://www.devspoint.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.devspoint.com</link>
	<description>For Developers</description>
	<lastBuildDate>Thu, 06 Oct 2011 03:55:34 +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>How to programatically add rows and columns to WPF DataGrid</title>
		<link>http://www.devspoint.com/net/how-to-programatically-add-rows-and-columns-to-wpf-datagrid.html</link>
		<comments>http://www.devspoint.com/net/how-to-programatically-add-rows-and-columns-to-wpf-datagrid.html#comments</comments>
		<pubDate>Thu, 06 Oct 2011 03:55:34 +0000</pubDate>
		<dc:creator>suraZ</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.devspoint.com/?p=136</guid>
		<description><![CDATA[It hasn&#8217;t been that long I started playing with WPF for Kiosk Application. Besides using forms and custom controls one may also need to use DataGrid in WPF. Today I would like to give you quick tips on adding data to DataGrid Programatically. I will start from the very new project so that even the [...]]]></description>
			<content:encoded><![CDATA[<p>It hasn&#8217;t been that long I started playing with WPF for Kiosk Application. Besides using forms and custom controls one may also need to use DataGrid in WPF. Today I would like to give you quick tips on adding data to DataGrid Programatically. I will start from the very new project so that even the most beginner will able to get success from this Tutorial.</p>
<h2>The Road Map</h2>
<ul>
<li>Create new project and add DataGrid and Button controls</li>
<li>Create public struct for DataGrid</li>
<li>Add Click event to Button to add Columns</li>
<li>Add Data to DataGrid with another button</li>
</ul>
<div>Let&#8217;s get started with the simple and easy tutorial.</div>
<h3>The new Project</h3>
<p>Creating new project is just like creating new Microsoft Word document. Load Visual Studio (in this tutorial: Visual Studio 2010). Go to File&gt;New&gt;Project (CTRL+SHIFT+N). Next choose a new WPF application project, name it DataGridDemo for future reference.</p>
<div id="attachment_141" class="wp-caption aligncenter" style="width: 574px"><a href="http://www.devspoint.com/wp-content/uploads/2011/10/DataGrid_New_project.jpg"><img class="size-full wp-image-141  " title="DataGrid_New_project" src="http://www.devspoint.com/wp-content/uploads/2011/10/DataGrid_New_project.jpg" alt="" width="564" height="320" /></a><p class="wp-caption-text">Create new WPF project</p></div>
<p>Once you are welcomed to WPF workspace, import DataGrid and two Buttons from the Toolbox at the left. Give it name and other properties. I named DataGrid as myGrid and two Buttons  as createColumn and addData respectively.</p>
<div id="attachment_145" class="wp-caption aligncenter" style="width: 400px"><a href="http://www.devspoint.com/wp-content/uploads/2011/10/workSpace_window.jpg"><img class="size-full wp-image-145 " title="workSpace_window" src="http://www.devspoint.com/wp-content/uploads/2011/10/workSpace_window.jpg" alt="" width="390" height="298" /></a><p class="wp-caption-text">Add Buttons and DataGrid</p></div>
<h3>Create public struct</h3>
<p>The struct will define the pattern of the data to be stored in the DataGrid along with this it will also hold the data which is going to be added to the DataGrid.</p>
<p>In code screen, add a new public struct with name myData. Inside it create new public data types for your DataGrid.</p>
<pre class="brush: css; title: ; notranslate">
public struct myData
        {
            public string Product { set; get; }
            public string Price { set; get; }
        }
</pre>
<p>Add public variables according to your need and column size.</p>
<h3>Add Columns</h3>
<p>Double click on Create Column button. Within the click event method, create new DataGridTextColumn object for each column and bind it with specific name.</p>
<pre class="brush: css; title: ; notranslate">
//creates new Text Column
DataGridTextColumn myProduct = new DataGridTextColumn();
myProduct.Binding = new Binding(&quot;Product&quot;);
// add header
myProduct.Header = &quot;Products&quot;;
//Finally add the column to the DataGrid
myGrid.Columns.Add(myProduct);
</pre>
<p>And here is the final code for all Product and Price column</p>
<pre class="brush: css; title: ; notranslate">
 //Create new object of DatagridTextColumn for Product column
            DataGridTextColumn myProduct = new DataGridTextColumn();
            myProduct.Binding = new Binding(&quot;Product&quot;);

            // for Price column
            DataGridTextColumn myPrice = new DataGridTextColumn();
            myPrice.Binding = new Binding(&quot;Price&quot;);

            // add headers
            myProduct.Header = &quot;Products&quot;;
            myPrice.Header = &quot;Price&quot;;

            // add to dataGrid
            myGrid.Columns.Add(myProduct);
            myGrid.Columns.Add(myPrice);
</pre>
<p>If you are so eager for the result then hit on <strong>F5.</strong></p>
<div id="attachment_140" class="wp-caption aligncenter" style="width: 459px"><a href="http://www.devspoint.com/wp-content/uploads/2011/10/dataGrid_colum_add_demo.jpg"><img class="size-full wp-image-140  " title="dataGrid_colum_add_demo" src="http://www.devspoint.com/wp-content/uploads/2011/10/dataGrid_colum_add_demo.jpg" alt="" width="449" height="295" /></a><p class="wp-caption-text">New Columns in DataGrid</p></div>
<h3>Add Data to DataGrid</h3>
<p>Now double click on Add Data button. Add new object of  myData to myGrid.</p>
<pre class="brush: css; title: ; notranslate">

myGrid.Items.Add(new myData() { Product = &quot;Samsung Mobile&quot;, Price = &quot;200&quot; });
</pre>
<p>Here is the final output.</p>
<div id="attachment_143" class="wp-caption aligncenter" style="width: 430px"><a href="http://www.devspoint.com/wp-content/uploads/2011/10/final_view.jpg"><img class="size-full wp-image-143 " title="final_view" src="http://www.devspoint.com/wp-content/uploads/2011/10/final_view.jpg" alt="" width="420" height="280" /></a><p class="wp-caption-text">Adding data to DataGrid</p></div>
<p>For automated data addition you can simple execute all of these in one function. Use column count to check the existance of the column in DataGrid. Here is a prototype:</p>
<pre class="brush: css; title: ; notranslate">

public void addData(string product, string price) {

if (myGrid.Columns.Count&lt;1) {

//Add columns programatically}

}

// Add Data To data grid

}
</pre>
<p>Also if you want to add data to the grid from database you can use the above addData function.</p>
<p>Here is a working demo to <a href="http://www.devspoint.com/demozone/DemoDataGrid.zip" target="_blank">download</a>.</p>
<p>Next you may want to get data/value from each cells in a selected row/cell. Subscribe us for next version of this article, it&#8217;s free.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devspoint.com/net/how-to-programatically-add-rows-and-columns-to-wpf-datagrid.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make use of flash content in unsupported browsers</title>
		<link>http://www.devspoint.com/html/make-use-of-flash-content-in-unsupported-browsers.html</link>
		<comments>http://www.devspoint.com/html/make-use-of-flash-content-in-unsupported-browsers.html#comments</comments>
		<pubDate>Wed, 28 Sep 2011 15:08:10 +0000</pubDate>
		<dc:creator>suraZ</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.devspoint.com/?p=120</guid>
		<description><![CDATA[With so much pleasing interactive features in Adobe Flash you might be little discouraged to know that some of your client&#8217;s browser doesn&#8217;t support flash. This is much the case with Apple iPhone devices where they&#8217;ve discontinued the support of Flash. Rather they&#8217;ve highly implemented HTML5. Google Swiffy With Google&#8217;s free online utility codenamed Swiffy, [...]]]></description>
			<content:encoded><![CDATA[<p>With so much pleasing interactive features in Adobe Flash you might be little discouraged to know that some of your client&#8217;s browser doesn&#8217;t support flash. This is much the case with Apple iPhone devices where they&#8217;ve discontinued the support of Flash. Rather they&#8217;ve highly implemented HTML5.</p>
<h3>Google Swiffy</h3>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/google_swiffy.jpg"><img class="aligncenter size-full wp-image-124" title="google_swiffy" src="http://www.devspoint.com/wp-content/uploads/2011/09/google_swiffy.jpg" alt="" width="214" height="57" /></a></p>
<p>With Google&#8217;s free online utility codenamed Swiffy,  you can convert your SWF flash content to HTML5 instantly. The swiffy conversion supports following features:</p>
<ul>
<li>Drop shadow, blur and glow filters for browsers with SVG filter support.</li>
<li>ANSI and Shift JIS encoding.</li>
<li>Bevel and Adjust Color filters.</li>
<li>Handling of dynamic text fields with the same variable name</li>
<li>Shape tweening.</li>
<li>SWF 6 function definitions.</li>
</ul>
<p><a href="http://www.google.com/doubleclick/studio/swiffy/gallery/example2.html" target="_blank">Click here</a> for the demo of Google Swiffy</p>
<h3>Adobe labs Wallaby</h3>
<div>Another tool you&#8217;d like to try is Adobe&#8217;s own Wallaby which converts your FLA files directly to HTML5. It&#8217;s standalone application in your desktop.</div>
<p><img class="aligncenter size-full wp-image-123" style="border-style: initial; border-color: initial;" title="adobe_labs_wallaby" src="http://www.devspoint.com/wp-content/uploads/2011/09/adobe_labs_wallaby.jpg" alt="" width="249" height="57" /></p>
<div><a href="http://labs.adobe.com/wiki/index.php/Wallaby#Features_and_Support" target="_blank">Here is the list</a> of supported and unsupported features of Flash in HTML5. You can try Wallaby by downloading from<a href="http://download.macromedia.com/pub/labs/wallaby/wallaby_p1_win_030811.exe" target="_blank"> here</a>.</div>
<div>It has easy interface to choose and convert the file. Softpedia have a detailed <a href="http://www.softpedia.com/progScreenshots/Wallaby-Screenshot-182962.html" target="_blank">screenshot </a>for this application.</div>
<div>These tools can be great help to make your Flash content accessible to both Flash supporters and HTML5 supporters. However, none of these tool can be proved to be best converter.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.devspoint.com/html/make-use-of-flash-content-in-unsupported-browsers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create elegant RSS icon using CSS3 only [Experimental]</title>
		<link>http://www.devspoint.com/css3/create-elegant-rss-icon-using-css3-only-experimental.html</link>
		<comments>http://www.devspoint.com/css3/create-elegant-rss-icon-using-css3-only-experimental.html#comments</comments>
		<pubDate>Thu, 22 Sep 2011 14:07:24 +0000</pubDate>
		<dc:creator>suraZ</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.devspoint.com/?p=102</guid>
		<description><![CDATA[These days, I am too much excited to experiment on CSS3 icons. Last time I wrote a tutorial on how to create Gmail icon using only CSS3. This time I am up with most popular term in world wide web, RSS. Yeah! in this tutorial you&#8217;ll learn how to create a RSS icon using only one [...]]]></description>
			<content:encoded><![CDATA[<p>These days, I am too much excited to experiment on CSS3 icons. Last time I wrote a tutorial on how to create Gmail icon using only CSS3. This time I am up with most popular term in world wide web, RSS.</p>
<p>Yeah! in this tutorial you&#8217;ll learn how to create a RSS icon using only one HTML element, i.e. anchor tag (&lt;a&gt;).</p>
<h2>The code plan</h2>
<ol>
<li>Create an anchor tag and shape it to orange box</li>
<li>Add dot and RSS curves</li>
<li>Done!</li>
</ol>
<h2>Creating the anchor tag</h2>
<p>Let&#8217;s create a new anchor tag with class name #rss.</p>
<pre class="brush: css; title: ; notranslate">
&lt;a class='rss' href='#'&gt;&lt;/a&gt;</pre>
<p>We&#8217;ll be applying varying css properties only to this anchor tag to create a cool RSS icon. Since an anchor tag is an inline element we&#8217;ll need to make it a block element then size it to 60X60px. Add some background color and give the relative position property to it. Additionally you can add gardient effect, rounded corner and shadows to give it a cool look.</p>
<pre class="brush: css; title: ; notranslate">
.rss {
	display: block;
	position: relative;
	width: 60px;
	height: 60px;
	padding: 0 2px;
	border-color: #ea6635;
	text-transform: lowercase;
	text-indent: -186px;
	font-size: 64px;
	font-weight: bold;
	color: #fff;
	background: #e36443;
	/* Shadow Effect */

	-webkit-box-shadow: 0 0 4px rgba(0,0,0,0.4);
	-moz-box-shadow: 0 0 4px rgba(0,0,0,0.4);
	box-shadow: 0 0 4px rgba(0,0,0,0.4);

	/* Gradient Effect */

	background: -webkit-gradient(linear, left top, left bottom, from(#f19242), to(#e36443));
	background: -webkit-linear-gradient(top, #f19242, #e36443);
	background: -moz-linear-gradient(top, #f19242, #e36443);
	background: -o-linear-gradient(top, #f19242, #e36443);
	background: -ms-linear-gradient(top, #f19242, #e36443);
	background: linear-gradient(top, #f19242, #e36443);

	/* Border Radius Effect*/

	-webkit-border-radius: 5px;
	-khtml-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
}
</pre>
<p>Here is the output:</p>
<div id="attachment_104" class="wp-caption aligncenter" style="width: 94px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/rss_bg.jpg"><img class="size-full wp-image-104" title="RSS icon box using CSS3" src="http://www.devspoint.com/wp-content/uploads/2011/09/rss_bg.jpg" alt="RSS icon box using CSS3" width="84" height="75" /></a><p class="wp-caption-text">RSS icon box using CSS3</p></div>
<h2>Add the RSS logo</h2>
<p>We&#8217;ll use :before and :after pseudo codes to implement the RSS logo over the orange box. First we&#8217;ll give absolute position to these pseudo codes, add blank content and position it 7px away from bottom and left.</p>
<pre class="brush: css; title: ; notranslate">
.rss:before, .rss:after {
	content: &quot;&quot;;
	position: absolute;
	bottom: 7px;
	left: 7px;
}
</pre>
<p>Next thing to do is add a dot and curves to them. First we&#8217;ll add a dot to .rss:before.</p>
<pre class="brush: css; title: ; notranslate">
.rss:before {
   width:12px;
   height:12px;
   background:#fff;
   /* Border radius equal to width and height */
   -moz-border-radius:12px;
   -webkit-border-radius:12px;
   border-radius:12px;

}
</pre>
<p>;</p>
<p>The output is this:</p>
<div id="attachment_105" class="wp-caption aligncenter" style="width: 93px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/rss_dot.jpg"><img class="size-full wp-image-105" title="CSS3 RSS icon dot" src="http://www.devspoint.com/wp-content/uploads/2011/09/rss_dot.jpg" alt="CSS3 RSS icon dot" width="83" height="82" /></a><p class="wp-caption-text">CSS3 RSS icon dot</p></div>
<p>Next last step to is to create two curves, we&#8217;ll do it with the help of double border to .rss:after.</p>
<pre class="brush: css; title: ; notranslate">
.rss:after {
	width: 22px;
	height: 22px;
	border-style: double;
	border-width: 24px 24px 0 0;
	border-color: #fff;

	/* Border-Radius */
	-webkit-border-radius: 0 50px 0 0;
	-khtml-border-radius: 0 50px 0 0;
	-moz-border-radius: 0 50px 0 0;
	border-radius: 0 50px 0 0;
}
</pre>
<p>You won&#8217;t beleive your eyes that you created such a beautiful RSS icon using only CSS. Here is the final output:</p>
<div id="attachment_106" class="wp-caption aligncenter" style="width: 90px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/CSS3_RSS_ICON.jpg"><img class="size-full wp-image-106" title="CSS3_RSS_ICON" src="http://www.devspoint.com/wp-content/uploads/2011/09/CSS3_RSS_ICON.jpg" alt="RSS icon made from CSS" width="80" height="72" /></a><p class="wp-caption-text">Final show</p></div>
<p><a href="http://www.devspoint.com/demozone/rssicon.html" target="_blank">Click here</a> for a working demo.</p>
<p>Currently, this is not supported in Internet Explorer. You can use PIE.htc or other similar tweaks to create curved border and gradient effect.</p>
<p><strong>Note:</strong>This is just an experimental tutorial, the output might not be good for practical use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devspoint.com/css3/create-elegant-rss-icon-using-css3-only-experimental.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 really simple AJAX preloader icons</title>
		<link>http://www.devspoint.com/jquery/5-really-simple-ajax-preloader-icons.html</link>
		<comments>http://www.devspoint.com/jquery/5-really-simple-ajax-preloader-icons.html#comments</comments>
		<pubDate>Wed, 21 Sep 2011 16:29:02 +0000</pubDate>
		<dc:creator>suraZ</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.devspoint.com/?p=77</guid>
		<description><![CDATA[Ajax loader can be a good way to amuse your visitor while the page loads. Today, I am listing you five such Ajax loader that are really simple and perfectly blend to any background color. Circle Bar This 16X16 preloader icon is calm and peaceful but aggressively attractive. It works well in any type of [...]]]></description>
			<content:encoded><![CDATA[<p>Ajax loader can be a good way to amuse your visitor while the page loads. Today, I am listing you five such Ajax loader that are really simple and perfectly blend to any background color.</p>
<h2>Circle Bar</h2>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/circle_bar.jpg"><img class="aligncenter size-full wp-image-91" title="circle_bar" src="http://www.devspoint.com/wp-content/uploads/2011/09/circle_bar.jpg" alt="" width="87" height="56" /></a>This 16X16 preloader icon is calm and peaceful but aggressively attractive. It works well in any type of background colors, even the dark one.</p>
<h2>Facebook Loader</h2>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/facebook_loader.jpg"><img class="aligncenter size-full wp-image-94" title="facebook_loader" src="http://www.devspoint.com/wp-content/uploads/2011/09/facebook_loader.jpg" alt="" width="122" height="57" /></a></p>
<p>Everyone is familiar with preloader in Facebook. This horizontal bar preloader with 16X11 dimension will make your visitor feel happy to wait. It&#8217;s boxy blocks perfectly blends to any background color.</p>
<h2>Tail Chaser</h2>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/tail_chaser1.jpg"><img class="aligncenter size-full wp-image-96" title="tail_chaser" src="http://www.devspoint.com/wp-content/uploads/2011/09/tail_chaser1.jpg" alt="" width="95" height="63" /></a></p>
<p>Yet another simple gradient circle that keeps chasing it&#8217;s tail. This loader is widely being used in many web and mobile apps. Visitor will definitely love to wait with these 20X20 loader.</p>
<h2>Fading Bars</h2>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/fading_boxes.jpg"><img class="aligncenter size-full wp-image-93" title="fading_boxes" src="http://www.devspoint.com/wp-content/uploads/2011/09/fading_boxes.jpg" alt="" width="174" height="62" /></a></p>
<p>May be you want something larger but simple yet. This 160X24 horizontal loader with 8 fading boxes is as good as others.</p>
<h2>Dotted Circle</h2>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/dotted_circle.jpg"><img class="aligncenter size-full wp-image-95" title="dotted_circle" src="http://www.devspoint.com/wp-content/uploads/2011/09/dotted_circle.jpg" alt="" width="102" height="74" /></a></p>
<p>Another 32X32 simple preloader which proves to fit in any type of webpage. It&#8217;s larger in size and more visible and attractive.</p>
<p>Here is a <a href="http://www.devspoint.com/demozone/preloader.html" target="_blank">demo </a>for these preloaders. You can <a href="http://www.devspoint.com/demozone/preloaders.zip" target="_blank">download </a>all of these loader from here. Besides these loaders you can generate large number of similar loaders in <a href="http://www.ajaxload.info" target="_blank">ajaxload.info</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devspoint.com/jquery/5-really-simple-ajax-preloader-icons.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Gmail envelope icon with CSS3</title>
		<link>http://www.devspoint.com/css3/create-gmail-envelope-icon-with-css3.html</link>
		<comments>http://www.devspoint.com/css3/create-gmail-envelope-icon-with-css3.html#comments</comments>
		<pubDate>Wed, 21 Sep 2011 14:05:23 +0000</pubDate>
		<dc:creator>suraZ</dc:creator>
				<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.devspoint.com/?p=52</guid>
		<description><![CDATA[I would like to show you a really simple trick to create Gmail logo using CSS3 and HTML. The code plan Create Red &#8216;M&#8217; shape of Gmail logo Create Envelope shape over it Add glossy effect to it Done! First Step &#8211; The Red M: We will need 3 DIV HTML elements to get this [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to show you a really simple trick to create Gmail logo using CSS3 and HTML.</p>
<h2>The code plan</h2>
<ol>
<li>Create Red &#8216;M&#8217; shape of Gmail logo</li>
<li>Create Envelope shape over it</li>
<li>Add glossy effect to it</li>
<li>Done!</li>
</ol>
<h2>First Step &#8211; The Red M:</h2>
<p>We will need 3 DIV HTML elements to get this job done. But at first, we&#8217;ll begin with a single DIV giving some unique identity to it. In this tutorial I&#8217;ve uniquely identified it as a &#8220;letter&#8221;;</p>
<pre class="brush: css; title: ; notranslate">&lt;div id=&quot;letter&quot;&gt;&lt;/div&gt;</pre>
<p>CSS3 has a very handy pesoudo code that allows you to do three things from a single element. We&#8217;ll be using :before and :after pseudo classes to create a M shape. Create a solid border with transparent bottom and rest of the sides red with 110px width, set height and width of the div to 0. This will create diagonal element.</p>
<pre class="brush: css; title: ; notranslate">
#letter {
	width:0;
	height:0;
	border-width:110px;
	border-style:solid;
	border-color:red red transparent red;
}</pre>
<p>Till now we&#8217;ve created this:</p>
<p><a href="http://www.devspoint.com/wp-content/uploads/2011/09/1.png.jpg"><img class="aligncenter size-full wp-image-71" title="CSS3 Gmail Logo" src="http://www.devspoint.com/wp-content/uploads/2011/09/1.png.jpg" alt="CSS3 Gmail Logo" width="240" height="241" /></a></p>
<p>Next we&#8217;ll be using two pseudo classes for &#8220;letter&#8221; :before and :after. But before moving towards them set the position of #letter to relative. The next content created from :before and :after will be floating over it.</p>
<pre class="brush: css; title: ; notranslate">
#letter {
	width:0;
	height:0;
	border-width:110px;
	border-style:solid;
	border-color:red red transparent red;
	position:relative;
}</pre>
<p>We&#8217;ll use the same technique of border to create white triangle which will overlap the upper red and hence give the following shape:</p>
<div id="attachment_70" class="wp-caption aligncenter" style="width: 248px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/2.jpg"><img class="size-full wp-image-70" title="CSS3 Gmail Logo Design" src="http://www.devspoint.com/wp-content/uploads/2011/09/2.jpg" alt="Gmail icon using CSS3" width="238" height="238" /></a><p class="wp-caption-text">Overlapping the upper red border</p></div>
<p>Create a CSS style for #letter with :before pseudocode. By default this pseudo element will be an inline, set it as block element with 0 height and width. Add property of solid border with white color at the top and rest of the sides transparent. Next we&#8217;ll have to float it over the red shape. Give it absolute positioning and some negative co-ordinates (for 110px red border I&#8217;ve given -70px left position and -120px top position) so that it will overlap the red border giving the shape as in above image.</p>
<p>Don&#8217;t forget to add content property with blank content it is necessary to make the existance of this pseudo code.</p>
<pre class="brush: css; title: ; notranslate">#letter:before {
	content:&quot;&quot;;
	display:block;
	position:absolute;
	left:-70px;
	top:-120px;
	width:0;
	height:0;
	border-width:70px;
	border-style:solid;
	border-color:white transparent transparent transparent;
}</pre>
<p>The last step and you&#8217;ll be creating a big red M shape. To #letter:after give similar property as for #letter:before only the difference would be left and right side white and top bottom as transparent color and co-ordinates of absolute positioning.</p>
<pre class="brush: css; title: ; notranslate">#letter:after {
	content:&quot;&quot;;
	color:#fff;
	display:block;
	position:absolute;
	left:-70px;
	top:-70px;
	z-index:999;
	width:0;
	height:0;
	border-width:70px;
	border-style	:solid;
	border-color:transparent white transparent white;
	}</pre>
<p>The above code will render following output:</p>
<div id="attachment_69" class="wp-caption aligncenter" style="width: 248px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/3.jpg"><img class="size-full wp-image-69" title="Getting the final M shape" src="http://www.devspoint.com/wp-content/uploads/2011/09/3.jpg" alt="Gmail CSS3 M shape done" width="238" height="234" /></a><p class="wp-caption-text">The final M</p></div>
<p>Yooohooo! Succesfully created a M shape. Are you excited? Read the next steps.</p>
<h2>Second Step &#8211; Opening an Envelope!</h2>
<p>Generally, letter is kept inside an envelope and that is what we are going to do here. Put the letter inside an envelope. Scracthing your head? Here&#8217;s the code:</p>
<pre class="brush: css; title: ; notranslate">
&lt;div id=&quot;envelope&quot;&gt;
	&lt;div id=&quot;letter&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>So the letter is inside an envelope now let&#8217;s write something for the envelope now.</p>
<p>The letter M was created with the border width of 110px, the left and right border will make it&#8217;s width to 220px. Therefore we&#8217;ll need to style the #envelope with the width of 220px and the height of 170px with overflow hidden that will hide the sharp edges at the bottom of the &#8220;M&#8221;. Also we&#8217;ll give the top and bottom border to outline the envelope.</p>
<pre class="brush: css; title: ; notranslate">#envelope {
	height:170px;
	width:220px;
	position:relative;
	overflow:hidden;
	border-top:#ccc solid 4px;
	border-bottom:#ccc solid 4px;
}</pre>
<p>Here is the output till now:</p>
<div id="attachment_68" class="wp-caption aligncenter" style="width: 253px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/4.jpg"><img class="size-full wp-image-68" title="Re-finished M of Gmail" src="http://www.devspoint.com/wp-content/uploads/2011/09/4.jpg" alt="Re-finished M of Gmail" width="243" height="192" /></a><p class="wp-caption-text">Re-finishing and envelope border</p></div>
<p>Now we&#8217;ll need a diagonal line to create the foldings of the envelope. Here again, the pseudo codes :before and :after is hero.</p>
<p>Style #envelope:before with grey background and inherit the height and width from the parent (#envelope) and don&#8217;t forget absolute positioning.</p>
<pre class="brush: css; title: ; notranslate">
#envelope:before {
	content: &quot;&quot;;
	position:absolute;
	top:0;
	left:0;
	height:inherit;
	width:inherit;
	background:#ccc;
}</pre>
<p>We are up to here:</p>
<div id="attachment_67" class="wp-caption aligncenter" style="width: 250px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/5.jpg"><img class="size-full wp-image-67" title="Preparing for the envelope corners" src="http://www.devspoint.com/wp-content/uploads/2011/09/5.jpg" alt="Preparing for the envelope corners" width="240" height="191" /></a><p class="wp-caption-text">Preparing for the envelope corners</p></div>
<p>In the end of this step we&#8217;ll overlap the gray background with white triangle. Set the solid border with white bottom and transparent rest and width of about 52px. Arrange the absolute position to 1px bottom and 58px left.</p>
<pre class="brush: css; title: ; notranslate">
#envelope:after {
	content:&quot;&quot;;
	position:absolute;
	bottom:1px;
	left:58px;
	border-color:transparent transparent white transparent;
	border-style:solid;
	border-width:52px;
}
</pre>
<p>This ends the third part.</p>
<h2>Third Step &#8211; Make it shiny!</h2>
<p>Create a child DIV of #envelope next to #letter, identify it as #shine.</p>
<pre class="brush: css; title: ; notranslate">
&lt;div id=&quot;envelope&quot;&gt;
	&lt;div id=&quot;letter&quot;&gt;&lt;/div&gt;
	&lt;div id=&quot;shine&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Create a gradient and set opacity as per your needs. Hint: use http://gradients.glrzad.com/ to create your own desired gradient color. For instance here is my choice with opacity 0.35 and absolute positioning of 0 to both top and left.</p>
<pre class="brush: css; title: ; notranslate">
#shine {
	background-image: linear-gradient(left top, #8F8F8F 3%, #FFFFFF 34%);
	background-image: -o-linear-gradient(left top, #8F8F8F 3%, #FFFFFF 34%);
	background-image: -moz-linear-gradient(left top, #8F8F8F 3%, #FFFFFF 34%);
	background-image: -webkit-linear-gradient(left top, #8F8F8F 3%, #FFFFFF 34%);
	background-image: -ms-linear-gradient(left top, #8F8F8F 3%, #FFFFFF 34%);
	background-image: -webkit-gradient(
		linear,
		left top,
		right bottom,
		color-stop(0.03, #8F8F8F),
		color-stop(0.34, #FFFFFF)
	);
	height:170px;
	width:220px;
	opacity:0.35;
	position:absolute;
	top:0;
	left:0;
}</pre>
<p>And this is the end of third, final step. Your final logo made from CSS3 will look like this:</p>
<div id="attachment_66" class="wp-caption aligncenter" style="width: 241px"><a href="http://www.devspoint.com/wp-content/uploads/2011/09/6.jpg"><img class="size-full wp-image-66" title="The final show down Gmail CSS3 Logo" src="http://www.devspoint.com/wp-content/uploads/2011/09/6.jpg" alt="The final show down Gmail CSS3 Logo" width="231" height="193" /></a><p class="wp-caption-text">The final show down</p></div>
<p>Click here for the live <a href="http://www.devspoint.com/demozone/gmailicon.html" target="_blank">demo </a>(doesn&#8217;t works in IE). Click here to <a href="http://www.devspoint.com/demozone/gmailicon.zip" target="_blank">download </a>the source code.</p>
<p><strong>Note:</strong> This is just an experimental tutorial, the output might not be useful in practical use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devspoint.com/css3/create-gmail-envelope-icon-with-css3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get started with simplest jQuery image slider</title>
		<link>http://www.devspoint.com/jquery/get-started-with-simplest-jquery-image-slider.html</link>
		<comments>http://www.devspoint.com/jquery/get-started-with-simplest-jquery-image-slider.html#comments</comments>
		<pubDate>Wed, 14 Sep 2011 09:29:59 +0000</pubDate>
		<dc:creator>suraZ</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.devspoint.com/?p=6</guid>
		<description><![CDATA[After following this simple tutorial, you&#8217;ll be learning how to create simplest and less coded jQuery image slider. Before you get started, have a look at the demo below. First we will be doing HTML part. This includes the skeletal mockup of the slideshow. It is very simple just unordered list inside a div tag [...]]]></description>
			<content:encoded><![CDATA[<p>After following this simple tutorial, you&#8217;ll be learning how to create simplest and less coded jQuery image slider. Before you get started, have a look at the demo below.</p>
<p><script type="text/javascript" src="http://www.devspoint.com/demozone/jquery_simple_slideshow.js"></script></p>
<div class="slideshow">
<ul>
<li><img class="slide" title="Worlds smallest jQuery Slideshow" src="http://4.bp.blogspot.com/_JrNnGuz-344/TIYMQUXCLoI/AAAAAAAAAdg/8GMkwQfFT8g/s320/slide4.JPG" alt=" Worlds smallest jQuery Slideshow" border="0" /></li>
<li><img class="slide" title="Worlds smallest jQuery Slideshow" src="http://2.bp.blogspot.com/_JrNnGuz-344/TIYMfKVlGmI/AAAAAAAAAdo/LWL4gvFNhvo/s320/slide3.jpg" alt="slide3 Worlds smallest jQuery Slideshow" border="0" /></li>
<li><img class="slide" title="Worlds smallest jQuery Slideshow" src="http://4.bp.blogspot.com/_JrNnGuz-344/TIYMjbn2z_I/AAAAAAAAAdw/YY2nw-fSiQM/s320/slide2.jpg" alt="slide2 Worlds smallest jQuery Slideshow" border="0" /></li>
<li><img class="slide" title="Worlds smallest jQuery Slideshow" src="http://2.bp.blogspot.com/_JrNnGuz-344/TIYMmBL5KnI/AAAAAAAAAd4/KzpoLADy7nQ/s320/slide1.jpg" alt="slide1 Worlds smallest jQuery Slideshow" border="0" /></li>
</ul>
</div>
<p>First we will be doing HTML part. This includes the skeletal mockup of the slideshow. It is very simple just unordered list inside a div tag will do this. Here is the sample code:</p>
<blockquote>
<pre>&lt;div class="slideshow"&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;img src="slide1.jpg" /&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src="slide2.jpg" /&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src="slide3.jpg" /&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src="slide4.jpg" /&gt;&lt;/li&gt;
    &lt;li&gt;&lt;img src="slide5.jpg" /&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</pre>
</blockquote>
<p>Now to give the skeletal some real shape we&#8217;ll add some CSS to them. Here is a sample code for CSS:</p>
<blockquote>
<pre>/* initialize the size of box and hide the overflow */
.slideshow {
	height:200px;
	width:350px;
	overflow:hidden;
	margin:0 auto;
}

/* Clear margin/padding, list-style and set position to relative */
.slideshow ul {
	list-style:none;
	margin:0;
	padding:0;
	position:relative;
	}

/* Set the position absolute, and top/left 0 */
.slideshow ul li {
	margin:0;
	padding:0;
	position:absolute;
	top:0;
	left;0;
	}
/* style for image */
.slideshow ul li img {
	height:200px;
	width:350px;
	border:none;
	margin:0;
	-web-kit-box-shadow:none;
	background:none;
	padding:0;
	}</pre>
</blockquote>
<p>Modify the CSS style as per your needs, but remember you don&#8217;t hurt the crucial part. Once you are satisfied with your design.</p>
<blockquote>
<pre>//Set x as 2 by default, it defines next slide after the first one
var x = 2;
// function to switch the images.
function slideSwitch() {
	      var m = 5;
		   x += 1;
		  if (x &gt; m) {
		  	x = 1
			}

   $(".slideshow ul li:nth-child(n)").animate({opacity:0});
   $(".slideshow ul li:nth-child(" + (x) + ")").animate({opacity:1});
}

$(document).ready(function() {
      setInterval( "slideSwitch()", 5000 );
});</pre>
</blockquote>
<p>Add the jQuery file to the head of your web document.</p>
<blockquote><p><code>&lt;script src='http://code.jquery.com/jquery-1.6.4.min.js' type='text/javascript'&gt;&lt;/script&gt;</code></p></blockquote>
<p>And this will be the end of the tutorial, test it in your browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devspoint.com/jquery/get-started-with-simplest-jquery-image-slider.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

