<?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>Snippets &#8211; Extreme Web Designs</title>
	<atom:link href="https://theextremewebdesigns.com/blog/category/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>https://theextremewebdesigns.com/blog</link>
	<description>Web Design and Web Development</description>
	<lastBuildDate>Tue, 22 Jan 2013 01:48:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
<site xmlns="com-wordpress:feed-additions:1">156673191</site>	<item>
		<title>WordPress Display Thumbnail for Post (2 Ways)</title>
		<link>https://theextremewebdesigns.com/blog/wordpress-display-thumbnail-for-post-2-ways/</link>
					<comments>https://theextremewebdesigns.com/blog/wordpress-display-thumbnail-for-post-2-ways/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 01:48:15 +0000</pubDate>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress-snippets]]></category>
		<category><![CDATA[wordpress-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=98</guid>

					<description><![CDATA[Did you ever want to make WordPress display Thumbnail for post but did not know how to do it? I am going to discuss 2 ways to do this. Just copy this snippet into your theme, wherever you want to display the thumbnail and that should do it. Method 1: if (has_post_thumbnail()) { $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumbnail_name'); // [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Did you ever want to make <em><strong>WordPress display Thumbnail for post </strong></em>but did not know how to do it? I am going to discuss 2 ways to do this. Just copy this snippet into your theme, wherever you want to <strong>display the thumbnail</strong> and that should do it.<span id="more-98"></span></p>
<p><strong>Method 1:</strong></p>
<pre class="lang:php decode:true">if (has_post_thumbnail())
{
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'thumbnail_name');
// This gives the thumbnail url
echo $thumb[0];
}</pre>
<p><strong>Method 2:</strong></p>
<pre class="lang:php decode:true">&lt;?php
if(has_post_thumbnail())
{
the_post_thumbnail();
}
?&gt;</pre>
<p>Do you know of any better method or a new method to <strong>display thumbnail for a post in WordPress</strong>? If yes, please share it with us in your comment below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/wordpress-display-thumbnail-for-post-2-ways/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">98</post-id>	</item>
		<item>
		<title>WordPress: Get all Categories of a post (both parent and children/sub categories)</title>
		<link>https://theextremewebdesigns.com/blog/wordpress-get-all-categories-of-a-post/</link>
					<comments>https://theextremewebdesigns.com/blog/wordpress-get-all-categories-of-a-post/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 19 Jan 2013 13:47:16 +0000</pubDate>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[tips-tricks]]></category>
		<category><![CDATA[wordpress-snippets]]></category>
		<category><![CDATA[wordpress-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=112</guid>

					<description><![CDATA[Have you ever wondered how to retrieve or get all categories of a post?  This little snippet will help you make WordPress get all Categories of a post (both parent and children/sub categories). WordPress: Get all Categories of a post (both parent and children/sub categories) &#60;?php the_category(', '); ?&#62; Do you know of any other way to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Have you ever wondered how to retrieve or get all categories of a post?  This little snippet will help you make WordPress get all Categories of a post (both parent and children/sub categories).<span id="more-112"></span></p>
<h2>WordPress: Get all Categories of a post (both parent and children/sub categories)</h2>
<pre class="lang:php decode:true">&lt;?php the_category(', '); ?&gt;</pre>
<p>Do you know of any other way to  <strong>fetch both parent and children/sub categories of a post</strong>? If yes, please share it with us in your comment below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/wordpress-get-all-categories-of-a-post/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">112</post-id>	</item>
		<item>
		<title>jQuery Scroll To Top Of Page Examples</title>
		<link>https://theextremewebdesigns.com/blog/jquery-scroll-to-top-scroll-to-top-of-page-using-jquery/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-scroll-to-top-scroll-to-top-of-page-using-jquery/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 30 Jul 2012 14:44:32 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-demos]]></category>
		<category><![CDATA[jquery-scroll]]></category>
		<category><![CDATA[jquery-snippets]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=1084</guid>

					<description><![CDATA[If you ever wondered how to scroll to top of page using jQuery, then here is the perfect snippet for you. In this article, I am going to share two snippets that will let you scroll to top of page and even control the speed at which the scrolling takes place, thus allowing you greater [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you ever wondered how to scroll to top of page using jQuery, then here is the perfect snippet for you. In this article, I am going to share two snippets that will let you <em><strong>scroll to top of page and even control the speed at which the scrolling takes place</strong></em>, thus allowing you greater control over the whole scrolling process. Read on to find out more about these copy &amp; use snippets!<span id="more-1084"></span></p>
<h2>Examples to Scroll to Top of Page using jQuery</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=1084" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>I am going to show you how you can use <em><strong>jQuery to scroll to top of page</strong></em> very easily, by means of an example. In this example, I am assuming that I have some content as my text, that spans more than one page and a hyperlink at the bottom of the content. I want to be able to click on this hyperlink so that the page automatically scrolls to the top of the page. In order to do this, I am applying a class of &#8220;scroll&#8221; to this hyperlink and adding code to this using jQuery. So here&#8217;s how it&#8217;s done:</p>
<h3>Example: Use jQuery to scroll to top of page and also control its speed (optional)</h3>
<pre class="lang:xhtml decode:true crayon-selected">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;jQuery Scroll to Top of Page Example&lt;/title&gt;
&lt;script type="text/javascript" src="js/jquery-1.8.2.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;

&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;
&lt;p&gt;Some content. &lt;/p&gt;

&lt;p&gt;&lt;a href="#" class="scroll"&gt;Go To Top&lt;/a&gt;&lt;/p&gt;
&lt;script type="text/javascript" language="javascript" &gt;

$(document).ready(function(){

	//Scroll slow
	$(".scroll").click(function() {
		$("html, body").animate({ scrollTop: 0 }, "slow");
		return false;
	});

	//Scroll fast
	$(".scroll").click(function() {
		$("html, body").animate({ scrollTop: 0 }, "fast");
		return false;
	});	

	//Scroll in 1 second - 1000 milliseconds
	$(".scroll").click(function() {
		$("html, body").animate({ scrollTop: 0 }, 1000);
		return false;
	});

	//Scroll in 5 seconds - 5000 milliseconds
	$(".scroll").click(function() {
		$("html, body").animate({ scrollTop: 0 }, 5000);
		return false;
	});

});	
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Each of the code blocks is commented at it&#8217;s beginning, for your easy understanding. <strong>When you try the code above, make sure that you comment all code blocks except the one that you want to test as only the first block of code will be executed because they are all linked to the click event of the same html element</strong>.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=1084" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>Simple, isn&#8217;t it?</h5>
<p>Do you know of any other ways to use <em><strong>jQuery to </strong><strong><em>scroll to top of page</em></strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-scroll-to-top-scroll-to-top-of-page-using-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1084</post-id>	</item>
		<item>
		<title>Call / Include / Load Latest jQuery Version in WordPress Theme / Plugin</title>
		<link>https://theextremewebdesigns.com/blog/call-include-load-latest-jquery-version-in-wordpress-theme-plugin/</link>
					<comments>https://theextremewebdesigns.com/blog/call-include-load-latest-jquery-version-in-wordpress-theme-plugin/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 12 Jul 2012 10:42:40 +0000</pubDate>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[latest-jquery-google-cdn]]></category>
		<category><![CDATA[wordpress-snippets]]></category>
		<category><![CDATA[wordpress-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=1036</guid>

					<description><![CDATA[If you are wondering how to Call / Include / Load Latest jQuery Version in WordPress Theme / Plugin, then look no further! In this article, I am going to share a very simple way that use can use to always load the latest jQuery version either in your Theme or Plugin or both. Read on [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you are wondering how to <strong>Call / Include / Load Latest jQuery Version in WordPress Theme / Plugin</strong>, then look no further! In this article, I am going to share a very simple way that use can use to always load the latest jQuery version either in your Theme or Plugin or both. Read on to find out more.<span id="more-1036"></span></p>
<h2>How to Call / Include / Load Latest jQuery Version in WordPress Theme / Plugin</h2>
<p>One of the strongest reason to include latest jQuery version is to take advantage of new features that jQuery offers without having to manually change the link pointer to latest jQuery version. That said, following are the ways to load latest jQuery version in WordPress:</p>
<h3>Load Latest jQuery Version in WordPress Theme:</h3>
<p>Paste the following code in your theme&#8217;s function.php file:</p>
<pre class="lang:php decode:true">function ewd_load_js()
{
if ( !is_admin() )
{
wp_deregister_script( 'jquery' );

wp_register_script('jquery', 'http://code.jquery.com/jquery-latest.min.js');

wp_enqueue_script('jquery');
}
}

add_action('wp_enqueue_scripts', 'ewd_load_js');</pre>
<h3>Load Latest jQuery Version in WordPress Plugin</h3>
<p>Or if you need the latest jQuery version to be loaded in your custom plugin, then simply paste the following code in your plugin&#8217;s main file:</p>
<pre class="lang:php decode:true">function ewd_load_js_plugin()
{
wp_deregister_script( 'jquery' );

wp_register_script('jquery', 'http://code.jquery.com/jquery-latest.min.js');

wp_enqueue_script('jquery');

}

add_action('wp_enqueue_scripts', 'ewd_load_js_plugin');</pre>
<h3>Load JavaScript(s) in Footer</h3>
<pre class="lang:xhtml decode:true crayon-selected">function ewd_load_js_plugin()
{
wp_deregister_script( 'jquery' );

wp_register_script('jquery', 'http://code.jquery.com/jquery-latest.min.js', 'false', 'false', true);

wp_enqueue_script('jquery');

}

add_action('wp_enqueue_scripts', 'ewd_load_js_plugin');</pre>
<p>So what is different in the above code? Well, if you pay close attention, we now have some new arguments appended in the wp_register_scripts function. Especially the argument &#8220;true&#8221;.  This corresponds to the $in_footer variable and it is this value that is responsible loading the scripts in footer. Here would be the actual usage of wp_register_script:</p>
<pre class="lang:php decode:true ">&lt;?php wp_register_script( $handle, $src, $deps, $ver, $in_footer ); ?&gt;</pre>
<p>$handle &#8211; Name of the script</p>
<p>$src &#8211; URL to script</p>
<p>$deps &#8211; Array of handles of all the registered scripts that this script depends on, that is the scripts that must be loaded before this script.</p>
<p>$ver &#8211; String specifying the script version number, if it has one, which is concatenated to the end of the path as a query string.</p>
<p>$in_footer &#8211; Normally scripts are placed in the &lt;head&gt; section. If this parameter is true the script is placed at the bottom of the &lt;body&gt;. This requires the theme to have the wp_footer() hook in the appropriate place.</p>
<h5>Your turn!</h5>
<p>Do you know of any other ways to <em><strong>Call / Include / Load Latest jQuery Version in WordPress Theme / Plugin</strong></em>? Feel free to suggest by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/call-include-load-latest-jquery-version-in-wordpress-theme-plugin/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1036</post-id>	</item>
		<item>
		<title>WordPress: Add Content After Post Automatically</title>
		<link>https://theextremewebdesigns.com/blog/wordpress-add-content-after-post-automatically/</link>
					<comments>https://theextremewebdesigns.com/blog/wordpress-add-content-after-post-automatically/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 29 May 2012 15:04:56 +0000</pubDate>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress-snippets]]></category>
		<category><![CDATA[wordpress-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=657</guid>

					<description><![CDATA[WordPress Add Content After Post Automatically &#8211; If you are a WordPress theme developer, at some point of time or other, you may have wanted to add content after post automatically. Here is a neat snippet that let&#8217;s you do exactly that with just few lines of code. WordPress Add Content After Post Automatically The solution provided [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>WordPress Add Content After Post Automatically</strong> &#8211; If you are a WordPress theme developer, at some point of time or other, you may have wanted to <strong>add content after post automatically.</strong> Here is a neat snippet that let&#8217;s you do exactly that with just few lines of code.<span id="more-657"></span></p>
<h2>WordPress Add Content After Post Automatically</h2>
<p>The solution provided here does not require you to edit the actual theme files. Simply copy the following code in the functions.php file of your theme, write the content that you want to be shown and you are done.</p>
<pre class="lang:php decode:true">function insert_custom_content($content)
{
if(!is_feed() &amp;&amp; !is_home()) {
$content.= "&lt;div class='custom_content'&gt;";
$content.= "&lt;h3&gt;Some heading&lt;/h3&gt;";
$content.= "&lt;p&gt;This is a custom content that appears at the end of every article.&lt;/p&gt;";
$content.= "&lt;/div&gt;";
}

return $content;
}
add_filter ('the_content', 'insert_custom_content');</pre>
<p>Very simple, isn&#8217;t it?</p>
<p><strong>That&#8217;s it!</strong></p>
<p>Do you know of any other ways to <strong>add content after post automatically in WordPress</strong>? Feel free to share your suggestions by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/wordpress-add-content-after-post-automatically/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">657</post-id>	</item>
		<item>
		<title>jQuery Center Div Example</title>
		<link>https://theextremewebdesigns.com/blog/jquery-center-div/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-center-div/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 14 Apr 2012 21:23:01 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=547</guid>

					<description><![CDATA[Love jQuery? Need a quick way to center div in window? In this article I am going to show you how to center div using jQuery. Example to Center Div using jQuery In order to use this, simply apply the .center() method to your element selector and that will center the div. &#60;style type="text/css"&#62; #my_div { [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Love jQuery? Need a quick way to center div in window? In this article I am going to show you<strong> <em>how to center div using jQuery</em></strong>.<span id="more-547"></span></p>
<h2>Example to Center Div using jQuery</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=547" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>In order to use this, simply apply the .center() method to your element selector and that will center the div.</p>
<pre class="lang:xhtml decode:true">&lt;style type="text/css"&gt;
#my_div {
	background-color: #DFF2FF;
	border: 1px solid #06F;
	height: 200px;
	width: 500px;
}
.my_div_2 {
	background-color: #FFCC66;
	border: 1px solid #F90;
	height: 100px;
	width: 300px;
}
&lt;/style&gt;

&lt;div id="my_div"&gt;This is my_div&lt;/div&gt;
&lt;div class="my_div_2"&gt;This is my_div_2&lt;/div&gt;

&lt;script type="text/javascript"&gt;
jQuery.fn.center = function () {
this.css("position","absolute");
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
return this;
}

//Call the "center" function on your desired div in the following way.
//Simply replace #my_div with the ID or the class of the div that you want to center.
$('#my_div').center();
$('.my_div_2').center();
&lt;/script&gt;</pre>
<p>When you run the above code, you will notice that the divs are centered in the window when the page loads.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=547" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>That&#8217;s it!</h5>
<p>Do you know of any other ways to use <em><strong>jQuery to center div</strong></em>? Please share your thoughts below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-center-div/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">547</post-id>	</item>
		<item>
		<title>Center Div Horizontally Using CSS Example</title>
		<link>https://theextremewebdesigns.com/blog/center-div-css/</link>
					<comments>https://theextremewebdesigns.com/blog/center-div-css/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 10 Apr 2012 06:40:20 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[css-snippets]]></category>
		<category><![CDATA[css-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=543</guid>

					<description><![CDATA[In this article, I am going to show you a very simple way to center div using css. How to Center div using CSS: Before I show you the markup, let&#8217;s quickly look at the output: Example: Horizontally Center div using CSS: &#60;style type="text/css"&#62; #outer { background-color: #930; padding: 15px; width: 500px; margin-left: auto; margin-right: auto; [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this article, I am going to show you a very simple way to <strong>center div using css</strong>.<span id="more-543"></span></p>
<h2>How to Center div using CSS:</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=543" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>Before I show you the markup, let&#8217;s quickly look at the output:</p>
<p><a href="https://theextremewebdesigns.com/blog/wp-content/uploads/2012/04/center_div_css.png" class="broken_link"><img decoding="async" class="aligncenter size-medium wp-image-544" title="Center div CSS" alt="Center div CSS" src="https://theextremewebdesigns.com/blog/wp-content/uploads/2012/04/center_div_css-300x79.png" width="300" height="79" /></a></p>
<p><strong>Example: Horizontally Center div using CSS:</strong></p>
<pre class="lang:xhtml decode:true">&lt;style type="text/css"&gt;
#outer {
background-color: #930;
padding: 15px;
width: 500px;
margin-left: auto;
margin-right: auto;
margin-top: 50px;
}
#inner {
color: #000;
background-color: #FFCFB9;
padding: 10px;
width: 200px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
&lt;/style&gt;

HTML:

&lt;div id="outer"&gt;

&lt;div id="inner"&gt;
This is inner div.
&lt;/div&gt;

&lt;/div&gt;</pre>
<p>Note that for the demo purposes, I have maintained the width of the outer div at 500px. You may remove/change it as you need.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=543" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>That&#8217;s it!</h5>
<p>Do you know of any other ways to <em><strong>Center div CSS</strong></em>? Feel free to share your thoughts by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/center-div-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">543</post-id>	</item>
		<item>
		<title>Center li in ul using CSS Example</title>
		<link>https://theextremewebdesigns.com/blog/center-li-in-ul-using-css/</link>
					<comments>https://theextremewebdesigns.com/blog/center-li-in-ul-using-css/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 10 Apr 2012 06:04:46 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[css-snippets]]></category>
		<category><![CDATA[css-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=532</guid>

					<description><![CDATA[When working with unordered lists (ul) using HTML &#38; CSS, you might have seen that the ul li stack vertically. But you may want them to stack horizontally and better yet, align them all horizontally so that all the li center in ul. So do you know how to center list item in the unordered [&#8230;]]]></description>
										<content:encoded><![CDATA[<div>When working with unordered lists (ul) using HTML &amp; CSS, you might have seen that the ul li stack vertically. But you may want them to stack horizontally and better yet, align them all horizontally so that all the li center in ul. So do you know how to center list item in the unordered list using CSS? If not, don&#8217;t worry In this article, I am going to show you a very simple way to <strong>center li in ul using CSS</strong> and thereby fabulous CSS menu and center the list items inside the list using an easy example.</div>
<div><span id="more-532"></span></div>
<h2>How to Center li in ul using CSS &#8211; Example</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=532" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>Before I show you the HTML and CSS required to center the list items in its parent unordered list using CSS, let&#8217;s look at the output:</p>
<div>
<p><a href="https://theextremewebdesigns.com/blog/wp-content/uploads/2012/04/center_li_in_ul_css.png" class="broken_link"><img decoding="async" class="aligncenter size-medium wp-image-534" title="Center li in ul CSS" alt="Center li in ul CSS" src="https://theextremewebdesigns.com/blog/wp-content/uploads/2012/04/center_li_in_ul_css-300x60.png" width="300" height="60" /></a></p>
</div>
<p>So this example assumes that we have a div and we are using an unordered list (ul list) with some list items (li items) in it. It&#8217;s upto you to decide how many li items you want to center in it. There&#8217;s no limit as such. But for the sake of the <strong>example to center li in ul using CSS</strong>, I am going to assume that we have 6 li items.</p>
<p><strong>The following is HTML markup. You may use it and change it as you need it.</strong></p>
<div>
<pre class="lang:xhtml decode:true">&lt;style type="text/css"&gt;#nav {
background-color: #930;
padding: 10px;
margin-left: auto;
margin-right: auto;
width: 500px;
margin-top: 50px;
}

#nav ul {
text-align: center;
padding: 0;
margin: 0;
}

#nav li {
display: inline;
list-style: none;
padding: 10px 5px 10px 5px;
}

#nav a {
color: #930;
text-decoration: none;
padding: 5px;
background-color: #FFBE9F;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: bold;
font-variant: normal;
}

#nav a:hover {
background-color: #FFC9AE;
}
&lt;/style&gt;

HTML:
&lt;div id="nav"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#"&gt;One&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Two&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Three&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Four&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Five&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Sixth link is long link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=532" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>Your Turn!</h5>
<p>Do you know of any other ways to <em><strong>center li in ul using CSS</strong></em>? Feel free to share your comments below.</p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/center-li-in-ul-using-css/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">532</post-id>	</item>
		<item>
		<title>jQuery Hide Show Textbox Examples</title>
		<link>https://theextremewebdesigns.com/blog/jquery-hide-show-textbox/</link>
					<comments>https://theextremewebdesigns.com/blog/jquery-hide-show-textbox/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 24 Mar 2012 00:51:41 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[jquery-snippets]]></category>
		<category><![CDATA[jquery-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=389</guid>

					<description><![CDATA[Many times it may have happened that you wanted to use jQuery to Hide/Show text boxes when a checkbox is checked or a button is clicked. This article will show you how to use jQuery to Show / Hide Textbox when checkbox is checked. How to Hide  Or Show Textbox using jQuery &#8211; Examples In order to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Many times it may have happened that you wanted to use jQuery to Hide/Show text boxes when a checkbox is checked or a button is clicked. This article will show you how to use <strong><em>jQuery to Show / Hide Textbox when checkbox is checked</em></strong>.<span id="more-389"></span></p>
<h2>How to Hide  Or Show Textbox using jQuery &#8211; Examples</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=389" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>In order to see how to show textbox or hide textbox using jQuery when checkbox is checked, lets assume that we have a textbox and few checkboxes. So here it goes:</p>
<h3>Example: Show / Hide Textbox when checkbox is checked using jQuery</h3>
<pre class="lang:xhtml decode:true crayon-selected">&lt;input type="checkbox" class="hide" /&gt;&lt;input type="text" value="Name" /&gt;&lt;br&gt;
&lt;input type="checkbox" class="hide" /&gt;&lt;input type="text" value="Email" /&gt;&lt;br&gt;
&lt;input type="checkbox" class="hide" checked="checked" /&gt;&lt;input type="text" value="Address" /&gt;&lt;br&gt;

&lt;script type="text/javascript"&gt;
$(document).ready(function() {

$('.hide').click(function() {
$(this).next().toggle();
});
$('.hide:checked').next().hide();

});
&lt;/script&gt;</pre>
<p>This third input box is for the Address and it is hidden by default when the page loads. This is achieved by simply marking its &#8220;checked&#8221; attribute as &#8220;checked&#8221;. Just refer to the third input element&#8217;s HTML code to understand this. The corresponding jQuery code to achieve this is:</p>
<pre class="lang:xhtml decode:true">$('.hide:checked').next().hide();</pre>
<p>Don&#8217;t forget to include your own version(preferably latest) of jQuery. Unless you have included a call to the jQuery framework, this demo will not work. Hope this helps.</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=389" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>Your turn!</h5>
<p>Do you know of any other ways to use <strong>jQuery to Show / Hide textbox</strong>? Please feel free to share by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/jquery-hide-show-textbox/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">389</post-id>	</item>
		<item>
		<title>How to create &#8220;Stitched&#8221; look using CSS3</title>
		<link>https://theextremewebdesigns.com/blog/how-to-create-stitched-look-using-css3/</link>
					<comments>https://theextremewebdesigns.com/blog/how-to-create-stitched-look-using-css3/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 24 Feb 2012 17:00:45 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[css-snippets]]></category>
		<category><![CDATA[css-tips]]></category>
		<guid isPermaLink="false">https://theextremewebdesigns.com/blog/?p=338</guid>

					<description><![CDATA[Ever wanted to create a Stitched look using CSS only without using any graphic tools? Here&#8217;s a little snippet of code that lets you achieve exactly that. Example to Create &#8220;Stitched&#8221; look using CSS3 Here is what we are going to create: &#60;style type="text/css"&#62; .stitched_bg { background-color: #356A00; padding: 5px; width: 145px; height: 145px; margin-left: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Ever wanted to create a <em><strong>Stitched look using CSS</strong></em> only without using any graphic tools? Here&#8217;s a little snippet of code that lets you achieve exactly that.<span id="more-338"></span></p>
<h2>Example to Create &#8220;Stitched&#8221; look using CSS3</h2>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=338" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<p>Here is what we are going to create:</p>
<p><a href="https://theextremewebdesigns.com/blog/wp-content/uploads/2012/02/stitched_box.png" class="broken_link"><img decoding="async" class="aligncenter size-full wp-image-339" title="Stitched look CSS" alt="Stitched look CSS" src="https://theextremewebdesigns.com/blog/wp-content/uploads/2012/02/stitched_box.png" width="161" height="159" /></a></p>
<pre class="lang:xhtml decode:true">&lt;style type="text/css"&gt;
.stitched_bg {
background-color: #356A00;
padding: 5px;
width: 145px;
height: 145px;
margin-left: auto;
margin-right: auto;
}
.stitched {
border:2px dashed #ffffff;
box-shadow: 0 0 0 8px #356A00;
color: #FFF;
height: 140px;
}
&lt;/style&gt;
&lt;div class="stitched_bg"&gt;
&lt;div class="stitched"&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>That&#8217;s it! Isn&#8217;t that simple?</p>
<div class="make_demo">

	<form action="https://theextremewebdesigns.com/blog/wp-content/themes/ewd_blog_2017/try_demo.php?post_id=338" method="post" name="form1" target="_blank" id="form1">


	<input type="hidden" name="shortcode_content" id="shortcode_content" value="" />

        <div class="try_demo_btn_container">


            <button type="submit" name="sbt_make_demo" id="sbt_make_demo" class="btn-primary btn-try-demo">
                Try Demo
            </button>


        </div><!-- .try_demo_btn_container -->

    </form>
    </div>
    
<h5>Your turn!</h5>
<p>Do you know of any other ways to <em><strong>create stitched effecting using only CSS</strong></em>? If yes, please feel free to share with us by commenting below.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://theextremewebdesigns.com/blog/how-to-create-stitched-look-using-css3/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">338</post-id>	</item>
	</channel>
</rss>
