<?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>Learn Web Design Online &#187; Tutorials</title>
	<atom:link href="/category/tutorials/feed" rel="self" type="application/rss+xml" />
	<link>https://learnwebdesignonline.com</link>
	<description>Resources for Learning Web Design and Web Development</description>
	<lastBuildDate>Sat, 31 Aug 2013 06:45:41 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.7.1</generator>
	<item>
		<title>Adding a Widget Area to WordPress Theme</title>
		<link>https://learnwebdesignonline.com/adding-a-widget-area-to-wordpress-theme</link>
		<comments>https://learnwebdesignonline.com/adding-a-widget-area-to-wordpress-theme#comments</comments>
		<pubDate>Sat, 31 Aug 2013 06:25:06 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=618</guid>
		<description><![CDATA[In this tutorial, we will add a new widget area to the default WordPress TwentyThirteen theme.   Before we make any changes to this theme, we had cloned TwentyThirteen into a new theme called TwentyCustom. See how in this tutorial.  And then activate the TwentyCustom theme. Now we will add our widget area to the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial, we will add a new widget area to the default WordPress TwentyThirteen theme.   Before we make any changes to this theme, we had cloned TwentyThirteen into a new theme called TwentyCustom. <a href="/how-to-clone-a-wordpress-theme">See how in this tutorial</a>.  And then activate the TwentyCustom theme.</p>
<p>Now we will add our widget area to the TwentyCustom theme.</p>
<p>1.  In Dashboard -&gt;Appearance -&gt; Widgets, see that the theme currently has two widget areas: The Main Widget area and the Secondary Widget area&#8230;.</p>
<div id="attachment_619" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/current-widget-areas.jpg"><img class="size-full wp-image-619" alt="current widget areas" src="/wp-content/uploads/2013/08/current-widget-areas.jpg" width="725" height="503" /></a><p class="wp-caption-text">current widget areas</p></div>
<p>that corresponds to these locations in our theme &#8230;</p>
<div id="attachment_620" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/location-widget-areas.jpg"><img class="size-full wp-image-620" alt="location of widget areas" src="/wp-content/uploads/2013/08/location-widget-areas.jpg" width="725" height="460" /></a><p class="wp-caption-text">location of widget areas</p></div>
<p>2.  Let&#8217;s add a new widget area at location shown in blue above &#8212; the right side of the header.</p>
<p>3.  We put some code (marked in red below) in header.php of our theme folder TwentyCustom to make room for our new widget area &#8230;</p>
<div id="attachment_622" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/widget-area-code-template.jpg"><img class="size-full wp-image-622" alt="widget area code in template" src="/wp-content/uploads/2013/08/widget-area-code-template.jpg" width="725" height="402" /></a><p class="wp-caption-text">widget area code in template</p></div>
<p>We bounded our existing header in a div floated left at 60% width.  We inlined the CSS styles for the purpose of this tutorial.  But you should refactor those styles out to your style.css file.</p>
<p>Then we created a second div floated left at width 40%.  This div shall be our header widget area.  To test how it shows up, we applied a blue border and put in dummy text &#8220;This is our new widget area&#8221;.</p>
<p>Finally, we wrapped these two divs in an container div with class &#8220;clear&#8221; because we see that class clear in style.css uses <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix technique</a> to clear floats.</p>
<p>4. Applying these changes, we see our widget area is nicely placed &#8230;</p>
<div id="attachment_623" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/widget-area-placed.jpg"><img class="size-full wp-image-623" alt="widget area placed" src="/wp-content/uploads/2013/08/widget-area-placed.jpg" width="725" height="290" /></a><p class="wp-caption-text">widget area placed</p></div>
<p>5. Next we have to register our widget so that admins can configure it in the dashboard.  We use the hook APIs which goes into the functions.php file of our theme folder.  At the bottom of our functions.php, we write this &#8230;</p>
<div id="attachment_624" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/code-to-register-widget.jpg"><img class="size-full wp-image-624" alt="code to register widget" src="/wp-content/uploads/2013/08/code-to-register-widget.jpg" width="725" height="329" /></a><p class="wp-caption-text">code to register widget</p></div>
<p>How did we know to write this?   Because that was how the theme TwentyThirteen registered its Main and Secondary widget area.  Just search &#8220;register_sidebar&#8221; in your functions.php and you see similar code.</p>
<p>But what it means is &#8230;</p>
<p>The &#8220;add_action&#8221; line is the taking advantage of WordPress&#8217;s widgets_init hook.   &#8220;widgets_init&#8221; is a WordPress hook.  When that event happens (which will happen when wordpress start initializing widgets), WordPress is going to call our function which we arbitrarily named &#8220;header1_widgets_init&#8221;.  But by convention, we usually have the suffix of the function match the hook.  That&#8217;s why the function name ends with &#8220;widgets_init&#8221;.</p>
<p>Then we define our function header1_widgets_init.  It basically just calls the WordPress function register_sidebar.  &#8221;sidebar&#8221; is what it calls &#8220;widgets area&#8221;.   register_sidebar takes array of key-value pairs, where you fill in the values.  For name, we gave it the value &#8220;Header Widget Area One&#8221;.  And we gave &#8220;header-1&#8243; as the id.</p>
<p>6. The function register_sidebar enables our widget area to show up in the dashboard.  Go to dashboard now and you can see it &#8230;</p>
<div id="attachment_626" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/widget-area-dashbard1.jpg"><img class="size-full wp-image-626" alt="widget area in dashbard" src="/wp-content/uploads/2013/08/widget-area-dashbard1.jpg" width="725" height="267" /></a><p class="wp-caption-text">widget area in dashbard</p></div>
<p>Note that the description that we passed into register_sidebar shows up as well.</p>
<p>7. While we are here, drag a search widget into there and give it the title &#8220;Find Something&#8221;.</p>
<div id="attachment_628" style="width: 716px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/add-widget-to-widget-area.jpg"><img class="size-full wp-image-628" alt="add widget to widget area" src="/wp-content/uploads/2013/08/add-widget-to-widget-area.jpg" width="706" height="370" /></a><p class="wp-caption-text">add widget to widget area</p></div>
<p>8. But it won&#8217;t show up on our site yet until we alter our theme header.php file code to be like &#8230;</p>
<div id="attachment_627" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/dynamic_sidebar.jpg"><img class="size-full wp-image-627" alt="dynamic_sidebar" src="/wp-content/uploads/2013/08/dynamic_sidebar.jpg" width="725" height="465" /></a><p class="wp-caption-text">dynamic_sidebar</p></div>
<p>We wrapped an if-statement around the second floated div (which we have removed the debugging blue border).   If the header sidebar is active (as determined by is_active_sidebar()), only then we display the second div.   Contained within the second div is our header widget area.</p>
<p>We replaced the dummy text dummy text &#8220;This is our new widget area&#8221;  with the call to the WordPress function dynamic_sidebar().  Thgis function will output all the necessary code for your widget area.  You just have to pass it the widget area id, which we had specified as &#8220;header-1&#8243; when we registered our sidebar.</p>
<p>8.  Now when you refresh the site, we see the search widget shown&#8230;</p>
<div id="attachment_629" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/widget-output-code.jpg"><img class="size-full wp-image-629" alt="widget output code" src="/wp-content/uploads/2013/08/widget-output-code.jpg" width="725" height="513" /></a><p class="wp-caption-text">widget output code</p></div>
<p>Inspecting the code, we see that our widget is wrapped in a pair of &#8220;aside&#8221; tags.  This is because of the values that we gave it for before_widget and after_widget when we register_sidebar.</p>
<p>Note that h3 tags that wraps our widget title is from the before_title and after_title values passed into register_sidebar.</p>
<p>The class attributes in these tags are what we gave it.  Except there is a &#8220;%1$s&#8221; and a &#8220;%2$s&#8221; in the values for before_widget and after_widget.  These are sprintf placeholder arguments so that WordPress can pass the widget id and widget type into the tags.</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/adding-a-widget-area-to-wordpress-theme/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Clone a WordPress Theme</title>
		<link>https://learnwebdesignonline.com/how-to-clone-a-wordpress-theme</link>
		<comments>https://learnwebdesignonline.com/how-to-clone-a-wordpress-theme#comments</comments>
		<pubDate>Sat, 31 Aug 2013 04:20:55 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=608</guid>
		<description><![CDATA[There are times when you need to clone a wordpress theme.  Suppose you want to customize the template of WordPress&#8217;s default Twenty Thirteen theme.   You should not edit the template files of the Twenty Thirteen theme directly, just like you should not edit WordPress core files.  Because at the next WordPress update, it may [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>There are times when you need to clone a wordpress theme.  Suppose you want to customize the template of WordPress&#8217;s default Twenty Thirteen theme.   You should not edit the template files of the Twenty Thirteen theme directly, just like you should not edit WordPress core files.  Because at the next WordPress update, it may overwrite your template customizations.</p>
<p>What you want to do is to clone the Twenty Thirteen theme and give it a new name.  Then you can make customization edits to this new theme.</p>
<p>1.  In your wp-content/themes/ folder, copy the twentythirteen folder to a new folder called twentycustom.  We will call our new custom theme &#8220;TwentyCustom&#8221;.</p>
<div id="attachment_615" style="width: 735px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/clone-wordpress-theme-folder1.jpg"><img class="size-full wp-image-615" alt="clone wordpress theme folder" src="/wp-content/uploads/2013/08/clone-wordpress-theme-folder1.jpg" width="725" height="727" /></a><p class="wp-caption-text">clone wordpress theme folder</p></div>
<p>2.  Within your new twentycustom folder, find the style.css file and edit the theme name to be &#8220;TwentyCustom&#8221; .  This line enables WordPress to find your theme.   You might want to alter the description and other properties in the file as well.</p>
<p>3. Now when you go to Appearance -&gt; Themes in your dashboard, you will see your new TwentyCustom theme.  If you want to change the theme thumbnail image, it is the file screenshot.png in the twentycustom folder.  Click &#8220;Activate&#8221; to activate your new cloned theme.</p>
<div id="attachment_616" style="width: 423px" class="wp-caption alignnone"><a href="/wp-content/uploads/2013/08/activate-cloned-theme.jpg"><img class="size-full wp-image-616" alt="activate the cloned theme" src="/wp-content/uploads/2013/08/activate-cloned-theme.jpg" width="413" height="473" /></a><p class="wp-caption-text">activate the cloned theme</p></div>
<p>4.  Now you can go make whatever edits you want in the theme files within the twentycustom folder without worry that WordPress updates would overwrite it.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/how-to-clone-a-wordpress-theme/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial on Creating Your First HTML 5 Page</title>
		<link>https://learnwebdesignonline.com/tutorial-on-creating-your-first-html-5-page</link>
		<comments>https://learnwebdesignonline.com/tutorial-on-creating-your-first-html-5-page#comments</comments>
		<pubDate>Sun, 14 Oct 2012 05:53:30 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=568</guid>
		<description><![CDATA[In this tutorial we will create a very simple HTML 5 page. We will keep it as simple as possible so that you can get something up and running quickly. HTML 5 is a significant change from HTML 4.  It comes with brand new tags and a new doctype plus more.   However older browsers [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we will create a very simple HTML 5 page. We will keep it as simple as possible so that you can get something up and running quickly.</p>
<p>HTML 5 is a significant change from HTML 4.  It comes with brand new tags and a new doctype plus more.   However older browsers that was in existence prior to HTML 5 will not know of these news tags.  Of course, we will want our page to be viewable on these older browser as well. Therefore there are various tricks and techniques that we have to employ in order to get our HTML 5 page to render on older browsers.</p>
<p>The easiest way to start is to start with an HTML 5 template that has all these techniques and best practices coded for you already.   HTML 5 Boilerplate is the popular template to use.  We will use this template as the skeleton for our HTML page.</p>
<p>1.  First download the latest HTML5 Boilerplate from <a href="http://html5boilerplate.com/">http://html5boilerplate.com/</a></p>
<p>In this tutorial we are using version 4.0.0.</p>
<p>2.  After you have downloaded and extracted the zip file into a new folder on your hard disk, you will see a bunch of files like the following&#8230;</p>
<p><a href="/wp-content/uploads/2012/10/html5-templatefiles.jpg"><img class="alignnone size-full wp-image-571" title="html5-templatefiles" src="/wp-content/uploads/2012/10/html5-templatefiles.jpg" alt="" width="282" height="544" /></a></p>
<p>3.  The main file that we are interested in is index.html.   Open this file in your favorite text editor. (I&#8217;m using Dreamweaver).</p>
<p>4.  Note the new doctype is now the following&#8230;</p>
<p>&lt;!DOCTYPE html&gt;</p>
<p>This is the new doctype for HTML5.  If you see this, it means that the author intends for this to be an HTML 5 document.</p>
<p><a href="/wp-content/uploads/2012/10/html5-doctype.jpg"><img class="alignnone size-full wp-image-577" title="html5-doctype" src="/wp-content/uploads/2012/10/html5-doctype.jpg" alt="HTML5 doctype" width="564" height="331" /></a></p>
<p>5.  Without changing any code, just test it by running the index.html file in your browser.   We are using Chrome for this viewing. As of this writing in October 2012, Chrome version 22 is the browser that supports the most features of the latest HTML5 specifications, according to <a href="http://html5test.com/results/desktop.html">HTM5Test.com</a>. That is why many web designers like to using Google Chrome during development.</p>
<p>You will see the following in the browser &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/first-html5-chrome.jpg"><img class="alignnone size-full wp-image-578" title="first-html5-chrome" src="/wp-content/uploads/2012/10/first-html5-chrome.jpg" alt="First HTML5 page viewed in Chrome" width="418" height="241" /></a></p>
<p>which indicates that everything currently works.</p>
<p>You can say that this is your first &#8220;Hello World&#8221; HTML5 page.  Of course, we now want to start writing some code so that we can understand how all the pieces are put together.</p>
<p>6.  Let&#8217;s add a title to our page by typing in &#8220;Our First HTML5 Page&#8221; into the index.html file in between the &lt;title&gt; tags as shown&#8230;</p>
<p><a href="/wp-content/uploads/2012/10/add-title.jpg"><img class="alignnone size-full wp-image-579" title="add-title" src="/wp-content/uploads/2012/10/add-title.jpg" alt="Add Page Title" width="512" height="192" /></a></p>
<p>This is known as the &#8220;Page Title&#8221;.  After saving the file and refreshing the browser, you should see that our page title shows up in the browser tab.</p>
<p><a href="/wp-content/uploads/2012/10/page-title-chrome.jpg"><img class="alignnone size-full wp-image-580" title="page-title-chrome" src="/wp-content/uploads/2012/10/page-title-chrome.jpg" alt="Page Title Shown in Tab" width="396" height="193" /></a></p>
<p>7.  HTML5 Boilerplate intends for you to delete things from it that you do not need.  One of the things that it puts in near the bottom of the HTML file is a code snippet intended for Google Analytics.  Since we will not be using that in this example, we will delete it.  If you don&#8217;t know what Google Analytics is, then you don&#8217;t need it.</p>
<p>Delete the code as that is marked as shown&#8230;</p>
<p><a href="/wp-content/uploads/2012/10/delete-google-analytics.jpg"><img class="alignnone size-full wp-image-581" title="delete-google-analytics" src="/wp-content/uploads/2012/10/delete-google-analytics.jpg" alt="Delete Google Analytics Code" width="768" height="442" /></a></p>
<p>If you save file and view in browser, you will see that the deletion had no effect.</p>
<p>8.  Let&#8217;s make the background color be a pale gray.   Styling information is done in CSS.  And if you are using HTML5, you would be using CSS3 (as opposed to CSS2).   The CSS code is found in the main.css file within the css folder.  You can see that our index.html file links to this css file via the link tag shown below &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/html-link-css.jpg"><img class="alignnone size-full wp-image-582" title="html-link-css" src="/wp-content/uploads/2012/10/html-link-css.jpg" alt="HTML links to CSS file" width="508" height="227" /></a></p>
<p>8.  Now open up the main.css file in your editor and look for the section that says &#8220;Author&#8217;s custom styles&#8221; &#8212; that&#8217;s for us.</p>
<p><a href="/wp-content/uploads/2012/10/add-first-css.jpg"><img class="alignnone size-full wp-image-583" title="add-first-css" src="/wp-content/uploads/2012/10/add-first-css.jpg" alt="Add first CSS rule" width="342" height="483" /></a></p>
<p>9.  We write our first CSS rule into that section.   The code shown above highlighted by the red rectangle is the code that we just added.  This tells the browser to set the background color of our page to be light gray (which is the hexidecimal color #CCCCCC).  Save changes in the CSS file and refresh browser.   Our page now has gray background.</p>
<p><a href="/wp-content/uploads/2012/10/gray-background.jpg"><img class="alignnone size-full wp-image-585" title="gray-background" src="/wp-content/uploads/2012/10/gray-background.jpg" alt="Gray background" width="418" height="247" /></a></p>
<p>10.  Now you may have noticed that the index.html page also links to another css file called normalize.css.</p>
<p><a href="/wp-content/uploads/2012/10/normalize-css.jpg"><img class="alignnone size-full wp-image-584" title="normalize-css" src="/wp-content/uploads/2012/10/normalize-css.jpg" alt="Normalize css" width="508" height="227" /></a></p>
<p>11. You don&#8217;t have to worry about that css file.  Not all browsers may use the same default styling for a HTML page.  Hence, one technique is to use CSS to make the styling consistent among browsers .   This is known &#8220;normalizing the styles&#8221; and the code for doing that is known as &#8220;css reset code&#8221;.  That is what is contained within normalize.css.</p>
<p>12.  Also within normalize.css, you will see this code &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/block-display-new-tags.jpg"><img class="alignnone size-full wp-image-586" title="block-display-new-tags" src="/wp-content/uploads/2012/10/block-display-new-tags.jpg" alt="Set block display for new tags" width="250" height="384" /></a></p>
<p><a href="/wp-content/uploads/2012/10/block-display-new-tags.jpg"></a>This is to allow older non-HTML5 browser to work well with the new HTML5 tags (some of which are article, aside, details, figcaption, figure, footer, header, hgroup, nav, section, summary).</p>
<p>The CSS contain styling to make these new tags display as &#8220;block style&#8221; tags.   Shown above is the &#8220;display&#8221; property with the &#8220;block&#8221; value for these new tags.  Don&#8217;t worry about what that means for now since this is your first  HTML5 page.  We have to take things one step at a time.  Just know that the above CSS code is needed to make older browser work with the new HTML5 tags.</p>
<p>13.  Next, let&#8217;s give some definition to our content area containing the text by adding some borders and a different content background color to set it apart from the background color.  In the index.html file, we will add an &#8220;article&#8221; tag (one of the new HTML5 tags) around the text content as shown&#8230;</p>
<p><a href="/wp-content/uploads/2012/10/article-tags.jpg"><img class="alignnone size-full wp-image-587" title="article-tags" src="/wp-content/uploads/2012/10/article-tags.jpg" alt="Article tags" width="423" height="200" /></a></p>
<p>Note that the starting tag (the first tag) is &lt;article&gt;</p>
<p>And the closing tag is &lt;/article&gt; with the extra slash at the end.  That is how most tags work.  They come in pairs with a starting tag and a closing tag.  Save changes and refresh browser.</p>
<p>14.  You will see no effect until we add styling rule for the article tag.  Let&#8217;s add the article CSS rule to the main.css file&#8230;</p>
<p><a href="/wp-content/uploads/2012/10/css-page-definition.jpg"><img class="alignnone size-full wp-image-588" title="css-page-definition" src="/wp-content/uploads/2012/10/css-page-definition.jpg" alt="CSS Page definition" width="292" height="274" /></a></p>
<p>We set the width of our page to be 500 pixels with the line &#8230;</p>
<pre>width: 500px;</pre>
<p>The margin property has two values &#8230;</p>
<pre>margin: 20px auto</pre>
<p>The first value 20px represents the top and bottom margins of our page.  The second value represents the left and right margins of our page.  Since we set that to &#8220;auto&#8221;, it has the effect of making the page be centered horizontally across the browser.</p>
<p>Saving the file and running in browser, we get  &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/first-html5-page-centered.jpg"><img class="alignnone size-full wp-image-589" title="first-html5-page-centered" src="/wp-content/uploads/2012/10/first-html5-page-centered.jpg" alt="First HTML5 page centered" width="727" height="235" /></a></p>
<p>15.  In CSS3, we can have rounded corners and drop shadows like &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/corners-drop-shadow1.jpg"><img class="alignnone size-full wp-image-592" title="corners-drop-shadow" src="/wp-content/uploads/2012/10/corners-drop-shadow1.jpg" alt="Corners and Drop Shadows" width="619" height="127" /></a></p>
<p>by adding the following two lines to our article CSS rule as shown below &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/article-css-rule.jpg"><img class="alignnone size-full wp-image-593" title="article-css-rule" src="/wp-content/uploads/2012/10/article-css-rule.jpg" alt="CSS rule for corners and drop shadows" width="302" height="144" /></a></p>
<p>For the <strong>border-radius</strong> property, we set the roundness to 8 pixels (the greater the value, the more rounded).</p>
<p>The first two values of the <strong>box-shadow</strong> property represents the horizontal and vertical offset respectively.  The third value is the amount of blur.  And the fourth value is the color of the shadow.</p>
<p>16. One last thing before we are done, the text content is too close to the left edge of the page.  Add a bit of padding around the article element by &#8230;.</p>
<p><a href="/wp-content/uploads/2012/10/padding-article.jpg"><img class="alignnone size-full wp-image-594" title="padding-article" src="/wp-content/uploads/2012/10/padding-article.jpg" alt="Pad article" width="267" height="150" /></a></p>
<p>and we should get &#8230;</p>
<p><a href="/wp-content/uploads/2012/10/after-padding.jpg"><img class="alignnone size-full wp-image-595" title="after-padding" src="/wp-content/uploads/2012/10/after-padding.jpg" alt="After padding" width="608" height="149" /></a></p>
<p>Since  we had only specified one value for the padding property, it will use the 30 pixels as padding for the top, right, bottom, and left edges.</p>
<p>In this case, since all the properties of the article CSS rule is unique, it does not matter which order you place the properties in.  We just like putting the padding property where it was.</p>
<p>And that is your first HTML 5 page.</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/tutorial-on-creating-your-first-html-5-page/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resizable Images that does not break out of container</title>
		<link>https://learnwebdesignonline.com/resizable-images-that-does-not-break-out-of-container</link>
		<comments>https://learnwebdesignonline.com/resizable-images-that-does-not-break-out-of-container#comments</comments>
		<pubDate>Sun, 02 Sep 2012 06:56:28 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=535</guid>
		<description><![CDATA[It is great when we create pages that resizes with the browser. However, it is not so great when an user resizes the browser to be smaller than an image. Typically, the image would remain at its fixed width and break out of its container. This can be fixed by applying &#8230; img { max-width: [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>It is great when we create <a href="/page-resize-with-browser">pages that resizes with the browser</a>.  However, it is not so great when an user resizes the browser to be smaller than an image.   Typically, the image would remain at its fixed width and break out of its container.</p>
<p>This can be fixed by applying &#8230;</p>
<p>img { max-width: 100%; }</p>
<p>to the image.   This constrains the maximum width of the image to be the width of its container.  If the container resizes smaller, the image will accordingly resize smaller to fit the container.  If the container resizes larger than the image width, the image will just be as big as its native width.  </p>
<p>The image will not scale up, unless you do &#8230;</p>
<p>img { width: 100%; }</p>
<p>which in this case would cause the image to be always at the width of its container.</p>
<p>This is known as fluid image.  It not only work for images, but works for other media as well.  Often designers will use the rule &#8230;</p>
<p>img, embed, object, video { max-width: 100%; }</p>
<p>Alternatively, instead of resizing the image, one can hide any portion of the image that falls outside its container by &#8230;</p>
<p>img { overflow: hidden; }</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/resizable-images-that-does-not-break-out-of-container/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resizable Faux Columns works with responsive page</title>
		<link>https://learnwebdesignonline.com/resizable-faux-columns-works-responsive-page</link>
		<comments>https://learnwebdesignonline.com/resizable-faux-columns-works-responsive-page#comments</comments>
		<pubDate>Sun, 02 Sep 2012 06:36:34 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=527</guid>
		<description><![CDATA[In a previous tutorial from which we now continue, we made an responsive page that resizes as the browser resizes. But as you will note, the column lengths are uneven due to uneven content&#8230; This can be remedied using a the &#8220;faux column&#8221; technique that uses a background image of the form &#8230; This background [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In a <a href="/page-resize-with-browser">previous tutorial</a> from which we now continue, we made an responsive page that resizes as the browser resizes.  But as you will note, the column lengths are uneven due to uneven content&#8230;</p>
<p><a href="/wp-content/uploads/2012/09/page-resize1.jpg"><img src="/wp-content/uploads/2012/09/page-resize1.jpg" alt="" title="page-resize1" width="472" height="327" class="alignnone size-full wp-image-520" /></a></p>
<p>This can be remedied using a the &#8220;<a href="http://www.alistapart.com/articles/fauxcolumns/">faux column</a>&#8221; technique that uses a background image of the form &#8230;</p>
<p><a href="/wp-content/uploads/2012/09/bgimg1.jpg"><img src="/wp-content/uploads/2012/09/bgimg1.jpg" alt="" title="bgimg1" width="671" height="14" class="alignnone size-full wp-image-528" /></a></p>
<p>This background is to be applied to the page wrapper and repeated down in the y-direction.</p>
<p>However, you have to make this image really wide (say 3000 pixels) to accomodate those people who stretch their browsers with really wide monitors.</p>
<p>And then apply this background image as follows &#8230;</p>
<p><a href="/wp-content/uploads/2012/09/resizable-column-split.jpg"><img src="/wp-content/uploads/2012/09/resizable-column-split.jpg" alt="" title="resizable-column-split" width="440" height="337" class="alignnone size-full wp-image-530" /></a></p>
<p>The trick is use the background x-position a percentage that matches the column split percentage.</p>
<p>Here is how it looks&#8230;.</p>
<p><a href="/wp-content/uploads/2012/09/resizable-faux-columns.jpg"><img src="/wp-content/uploads/2012/09/resizable-faux-columns.jpg" alt="" title="resizable-faux-columns" style="max-width:100%;" class="alignnone size-full wp-image-529" /></a></p>
<p>And it will look the same even if you resize the browser.</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/resizable-faux-columns-works-responsive-page/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make your page resize with browser</title>
		<link>https://learnwebdesignonline.com/page-resize-with-browser</link>
		<comments>https://learnwebdesignonline.com/page-resize-with-browser#comments</comments>
		<pubDate>Sun, 02 Sep 2012 05:45:26 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=516</guid>
		<description><![CDATA[With responsive web design, the web page scales in proportion with the browser size. If you are using pixel fixed width, when the browser window is smaller than the page design width, you get horizontal scroll bars. By using percentages instead, your page will resize as your browser resizes. Suppose you have an HTML structure [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>With responsive web design, the web page scales in proportion with the browser size.</p>
<p>If you are using pixel fixed width, when the browser window is smaller than the page design width, you get horizontal scroll bars.</p>
<p>By using percentages instead, your page will resize as your browser resizes.</p>
<p>Suppose you have an HTML structure such as &#8230;</p>
<p><a href="/wp-content/uploads/2012/09/html-structure.jpg"><img class="alignnone size-full wp-image-518" title="html-structure" src="/wp-content/uploads/2012/09/html-structure.jpg" alt="" width="316" height="197" /></a></p>
<p>We want our article to be on the left taking up two-thirds of the page.  And the aside to be one-third on the right.   Both are contained by our page represented by a div of id &#8220;wrapper&#8221; which we want to be 90% of the width of whatever our browser window happens to be.  </p>
<p>So we would construct our CSS to be &#8230;</p>
<p><a href="/wp-content/uploads/2012/09/flexible-page.jpg"><img src="/wp-content/uploads/2012/09/flexible-page.jpg" alt="" title="flexible-page" width="428" height="322" class="alignnone size-full wp-image-519" /></a></p>
<p>And this is how it looks in our browser &#8230;.</p>
<p><a href="/wp-content/uploads/2012/09/page-resize1.jpg"><img src="/wp-content/uploads/2012/09/page-resize1.jpg" alt="" title="page-resize1" width="472" height="327" class="alignnone size-full wp-image-520" /></a></p>
<p>Note that our page is centered horizontally across our browser window with a 5% margin on left and right.  That is because our page is 90% of browser width.</p>
<p>And if we resize our browser wider, our page resizes and the proportion of our article and aside remains the same.</p>
<p><a href="/wp-content/uploads/2012/09/page-resize2.jpg"><img src="/wp-content/uploads/2012/09/page-resize2-1024x306.jpg" alt="" title="page-resize2" style="max-width:100%;" class="alignnone size-large wp-image-521" /></a></p>
<p>Note that the column lengths are uneven due to uneven amounts of content.   We will learn how to fix this with <a href="/wp-admin/post.php?post=527&#038;action=edit">resizable faux columns</a> in the next tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/page-resize-with-browser/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Not to Use Pixels for Font Size</title>
		<link>https://learnwebdesignonline.com/how-not-to-use-pixels-for-font-size</link>
		<comments>https://learnwebdesignonline.com/how-not-to-use-pixels-for-font-size#comments</comments>
		<pubDate>Sun, 02 Sep 2012 05:15:59 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=514</guid>
		<description><![CDATA[If you want a responsive web design where the font size can be adjusted by the users preference via the browser, you do not want pixels. Instead use the unit of &#8220;em&#8221; or percentages. Here is how. In your HTML CSS &#8230; html {     font-size: 100%; } That means that the font will be [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you want a responsive web design where the font size can be adjusted by the users preference via the browser, you do not want pixels.  Instead use the unit of &#8220;em&#8221; or percentages.</p>
<p>Here is how.</p>
<p>In your HTML CSS &#8230;</p>
<pre>html {    
    font-size: 100%;
}</pre>
<p>That means that the font will be in the browser&#8217;s default size, which is typically 16px.</p>
<p>If your design calls for larger or smaller font than that, use &#8220;em&#8221;.  For example, if you want exactly 16px, then it would be 1em.   As in &#8230;</p>
<pre>body {
    font-size: 1em;
}</pre>
<p>If you want your h1 to be 32px, use &#8220;2em&#8221; as in &#8230;</p>
<pre>h1 {
    font-size: 2em;
}</pre>
<p>If you want your h2 to be 24px, it would be 24/16 = 1.5em.</p>
<p>If you want class &#8220;.smalltext&#8221; to be 12px, it would be 12/16 = 0.75em.</p>
<p>Advanced note:  In HTML5Boilerplate, they use </p>
<pre>html {    
    font-size: 100%;
    -webkit-text-size-adjust: 100%; 
    -ms-text-size-adjust: 100%; 
}</pre>
<p>where the 2nd and 3rd line is to &#8220;prevent iOS text size adjust after orientation change, without disabling user zoom&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/how-not-to-use-pixels-for-font-size/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Based Horizontal Tabs</title>
		<link>https://learnwebdesignonline.com/css-based-horizontal-tabs</link>
		<comments>https://learnwebdesignonline.com/css-based-horizontal-tabs#comments</comments>
		<pubDate>Mon, 25 Jul 2011 02:50:48 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=436</guid>
		<description><![CDATA[In this tutorial, we are going to create CSS-based horizontal tabs as shown here. View live code here. Graphics Used The graphics looks like this &#8230; Default gradient tab: default_tab.jpg &#160; Highlighted tab&#8230; &#160; But instead of using two different graphic files for the two tabs, we combine the default tab and highlighted tab into [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this tutorial, we are going to create CSS-based horizontal tabs as shown here.</p>
<div id="attachment_437" style="width: 361px" class="wp-caption alignnone"><img class="size-full wp-image-437" title="horizontal CSS tabs" src="/wp-content/uploads/2011/07/horizontal-css-tabs-final.gif" alt="horizontal CSS tabs" width="351" height="217" /><p class="wp-caption-text">horizontal CSS tabs</p></div>
<p><a href="/example/code/horizontal-tabs.html">View live code here</a>.</p>
<h2>Graphics Used</h2>
<p>The graphics looks like this &#8230;</p>
<p>Default gradient tab: <strong>default_tab.jpg</strong></p>
<p><img class="alignnone size-full wp-image-438" title="default_tab" src="/wp-content/uploads/2011/07/default_tab.jpg" alt="" width="88" height="23" /></p>
<p>&nbsp;</p>
<p><strong>Highlighted tab&#8230;</strong></p>
<p><strong><img class="alignnone size-full wp-image-439" title="highlighted_tab" src="/wp-content/uploads/2011/07/highlighted_tab.jpg" alt="" width="88" height="23" /></strong></p>
<p>&nbsp;</p>
<p>But instead of using two different graphic files for the two tabs, we  combine the default tab and highlighted tab into one graphic as shown.</p>
<p>Combined tab: <strong>tabs.jpg</strong></p>
<p><strong><img class="alignnone size-full wp-image-440" title="tabs" src="/wp-content/uploads/2011/07/tabs.jpg" alt="" width="176" height="23" /></strong></p>
<p>Because the two tab images are on one file, they will load with the  single file.  This will improve performance due to one less server call  to get another graphics file.  And it will avoid any &#8220;flicker&#8221; that may  occur if we had to wait for the browser to load a separate image for the  hover state.</p>
<h2>Page Structure</h2>
<p>First, we will start out with a page structure on to which we will  place our tabs to be sitting right on top of the gold nav strip.</p>
<div id="attachment_441" style="width: 535px" class="wp-caption alignnone"><img class="size-full wp-image-441" title="page structure for horizontal tabs" src="/wp-content/uploads/2011/07/skeleton-page.gif" alt="page structure for horizontal tabs" width="525" height="287" /><p class="wp-caption-text">page structure for horizontal tabs</p></div>
<p>The code for this page looks like &#8230;</p>
<div id="attachment_442" style="width: 518px" class="wp-caption alignnone"><img class="size-full wp-image-442" title="code for page structure of CSS tabs" src="/wp-content/uploads/2011/07/skeleton-code-css-tabs.gif" alt="code for page structure of CSS tabs" width="508" height="832" /><p class="wp-caption-text">code for page structure of CSS tabs</p></div>
<p>Note that for the sake of simplicity, this tutorial had placed the  CSS on the same page embedded in the head section.  However, for  production code, you should put the CSS in a separate CSS file.  Also  images will be referenced in the same directory.  Again, for production  code, they would normally be in a separate directory.</p>
<h2>Coding the CSS Based Horizontal Tabs</h2>
<p>1. Start by letting the tabs be links in an unordered list&#8230;</p>
<p><img class="alignnone size-full wp-image-443" title="where-code-css-horizontal-tabs" src="/wp-content/uploads/2011/07/where-code-css-horizontal-tabs.gif" alt="" width="376" height="194" /></p>
<p>And we get this &#8230;</p>
<p><img class="alignnone size-full wp-image-444" title="css-horizontal-tabs-1" src="/wp-content/uploads/2011/07/css-horizontal-tabs-1.gif" alt="" width="280" height="218" /></p>
<p>2. Because different browsers may have different default margins and paddings for <strong>ul</strong>&#8216;s and <strong>li</strong>&#8216;s, we set them all to zero first and then we can adjust them later. We give the ul element an id of tabnav and create a CSS rule to select this ul and li&#8217;s that it contains.</p>
<p><img class="alignnone size-full wp-image-445" title="code for css tabs" src="/wp-content/uploads/2011/07/zero-out-css-tabs-margin-padding.gif" alt="code for css tabs" width="402" height="437" /></p>
<p>3.  In the CSS, we remove the bullets that normally appears in the  unordered list.  And we remove the underlines that normally occurs in  the links for li&#8217;s.</p>
<p><img class="alignnone size-full wp-image-446" title="code for CSS horizontal tabs" src="/wp-content/uploads/2011/07/remove-css-horiz-tabs.gif" alt="code for CSS horizontal tabs" width="342" height="213" /></p>
<p>4. The main characteristic about horizontal css tabs is that they actually be horizontal.  We make the list items horizontal by floating the li&#8217;s.  When we float the li&#8217;s, we need to give it a width.  We set the li&#8217;s to 88px by 23px since that is the size of our graphic image for one tab.</p>
<p><img class="alignnone size-full wp-image-447" title="float-size-horiz-css-tabs" src="/wp-content/uploads/2011/07/float-size-horiz-css-tabs.gif" alt="" width="339" height="257" /></p>
<p>Now the list items are horizontal &#8230;</p>
<p><img class="alignnone size-full wp-image-448" title="horizontal list items to be tabs" src="/wp-content/uploads/2011/07/horizontal-list-item-tabs.gif" alt="horizontal list items to be tabs" width="331" height="217" /></p>
<p>5. We set the display of the link to be block so that the link will expand to fill the entire width of the li, making the entire tab clickable and not just the text clickable.  This is done with the following CSS &#8230;</p>
<p>display:block;</p>
<p>6.  We set the background image of link to be the tab graphic.  We  center align the text.  Finally, we stylize the link with a color and  font size that is suitable to match the tab graphics&#8230;</p>
<p><img class="alignnone size-full wp-image-449" title="stylize horizontal CSS tabs" src="/wp-content/uploads/2011/07/stylize-horizontal-css-tab.gif" alt="stylize horizontal CSS tabs" width="458" height="371" /></p>
<p>And we get&#8230;</p>
<p><img class="alignnone size-full wp-image-450" title="horizontal CSS tabs" src="/wp-content/uploads/2011/07/horizontal-css-tabs-6.gif" alt="horizontal CSS tabs" width="308" height="205" /></p>
<p>7. Notice that the tabs are much shorter than we would like.  In fact,  the tab height is only taking up as much height as needed by the text  instead of the full 23px height of the tab graphic.  Therefore, we remove  the &#8220;height&#8221; attribute from the &#8220;li&#8221; to the &#8220;a&#8221; selector rule.</p>
<p><img class="alignnone size-full wp-image-451" title="height-horizontal-css-tabs" src="/wp-content/uploads/2011/07/height-horizontal-css-tabs.gif" alt="" width="457" height="370" /></p>
<p>And we get &#8230;</p>
<p><img class="alignnone size-full wp-image-452" title="horizontal-css-tabs-7" src="/wp-content/uploads/2011/07/horizontal-css-tabs-7.gif" alt="" width="325" height="215" /></p>
<p>&nbsp;</p>
<p>8.  The text is sitting a little bit too high in relation to the tab graphics, so we add 3px top padding to the link.  But when we add padding to the link, remember to decrease the height by the same amount since &#8220;height&#8221; in CSS is defined as &#8220;content height&#8221; and does not include any padding.</p>
<p><img class="alignnone size-full wp-image-453" title="adjust-height-css-horizontal-tabs" src="/wp-content/uploads/2011/07/adjust-height-css-horizontal-tabs.gif" alt="" width="447" height="192" /></p>
<p>9. To create the hover effect where the highlighted tab is displayed  when the mouse cursor is over the tab, we add a new CSS rule using the  hover pseudo-class where we shift the background image to the left by  88px.  Recall that the highlighted tab image is on the right-half of the  graphics file and that each tab image is 88px in width.</p>
<p><img class="alignnone size-full wp-image-454" title="shift bg image of horizontal CSS tabs" src="/wp-content/uploads/2011/07/shift-bg-image-horiz-css-tabs.gif" alt="shift bg image of horizontal CSS tabs" width="443" height="259" /></p>
<p>We also altered the link color upon hover to better constrast with the highlighted tab.</p>
<p>And here is what it looks like if you hover over the home tab&#8230;</p>
<p><img class="alignnone size-full wp-image-455" title="horizontal-css-tabs-9" src="/wp-content/uploads/2011/07/horizontal-css-tabs-9.gif" alt="" width="350" height="215" /></p>
<p>10.  If we want the home tab to stay highlighted because this is the &#8220;home&#8221; page, then we have to add a class to the &#8220;home&#8221; link to make it different from the rest of the links.  We&#8217;ll give it the arbitrary class called &#8220;selected&#8221; and add the CSS selector rule as shown&#8230;</p>
<p><img class="alignnone size-full wp-image-456" title="horizontal CSS selected tab" src="/wp-content/uploads/2011/07/horizontal-css-selected-tab.gif" alt="horizontal CSS selected tab" width="446" height="254" /></p>
<p>11.  We want the tabs to be sitting on the gold nav strip, not floating  near the top of the page masthead.  No problem.  With some graphical  measurements, we determined that all we need to do is to move the whole  tab structure 71px lower.  We do so by giving a top margin to the ul element, since the ul element is what contains all the tabs.</p>
<p><img class="alignnone size-full wp-image-457" title="top-margin-css-horizontal-tabs" src="/wp-content/uploads/2011/07/top-margin-css-horizontal-tabs.gif" alt="" width="361" height="196" /></p>
<p>And now it looks like &#8230;</p>
<p><img class="alignnone size-full wp-image-458" title="horizontal-css-tabs-located" src="/wp-content/uploads/2011/07/horizontal-css-tabs-located.gif" alt="" width="333" height="220" /></p>
<p>12.  Let&#8217;s space the horizontal tabs apart by adding 10px right margin to the li element.</p>
<p><img class="alignnone size-full wp-image-459" title="right-margin-horizontal-css-tabs" src="/wp-content/uploads/2011/07/right-margin-horizontal-css-tabs.gif" alt="" width="383" height="195" /></p>
<p>And we got our final product that looks like &#8230;</p>
<div id="attachment_437" style="width: 361px" class="wp-caption alignnone"><img class="size-full wp-image-437" title="horizontal CSS tabs" src="/wp-content/uploads/2011/07/horizontal-css-tabs-final.gif" alt="horizontal CSS tabs" width="351" height="217" /><p class="wp-caption-text">horizontal CSS tabs</p></div>
<p>And there you have it.</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/css-based-horizontal-tabs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick FTP connect with FileZilla</title>
		<link>https://learnwebdesignonline.com/quick-ftp-connect-filezilla</link>
		<comments>https://learnwebdesignonline.com/quick-ftp-connect-filezilla#comments</comments>
		<pubDate>Mon, 25 Jul 2011 02:11:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[filezilla]]></category>
		<category><![CDATA[other]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=432</guid>
		<description><![CDATA[FTP stands for &#8220;File Transfer Protocol&#8221;. In order to transfer files to a server, you to need use a software known as a &#8220;FTP client&#8221;. FileZilla is one such software for Windows and is free. (Mac users can use CyberDuck) In this tutorial, we will show you how to use FileZilla&#8217;s &#8220;Quick Connect&#8221; feature to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>FTP stands for &#8220;File Transfer Protocol&#8221;.  In order to transfer files  to a server, you to need use a software known as a &#8220;FTP client&#8221;.  <a href="http://filezilla-project.org/">FileZilla</a> is one such software for Windows and is free.  (Mac users can use <a href="http://cyberduck.ch/">CyberDuck</a>)</p>
<p>In this tutorial, we will show you how to use FileZilla&#8217;s &#8220;Quick Connect&#8221; feature to transfer files to a web server.</p>
<p>Although this method is the simplest way to connect, it is not the  best because it transmits passwords and data over the internet route via  &#8220;clear text&#8221;.  Once you have learned the basics of FTP, ideally you  will want to use <a href="/tutorials/webhost-admin/sftp-filezilla-tutorial">SFTP which is a secured transmission of data as described in our other tutorial</a>.</p>
<h2>FileZilla Quick Connect FTP</h2>
<p><strong>Step 1:</strong> First download and install FileZilla from <a href="http://filezilla-project.org/">FileZilla-Project.org</a>.  Click on the &#8220;<strong>Download FileZilla Client</strong>&#8221; button.  It is free.</p>
<p><strong>Step 2:</strong> In order to connect to the webserver, you  need three pieces of information provided by your webserver  administrator: 1) the host name, 2) the username, and 3) the password.</p>
<p>In this example tutorial, we use these three fake pieces of information&#8230;</p>
<p>server: <strong>example.com</strong><br />
username: <strong>someone@example.com</strong><br />
password: <strong>123456</strong></p>
<p>Note that depending on the webhost, the username can in the form of  an email address (but it is not a real email address) as in the above or  it can be a single word as in &#8220;<strong>someone</strong>&#8220;.</p>
<p><strong>Step 3:</strong> After you run FileZilla, enter the server, username, password and click the &#8220;<strong>Quick Connect</strong>&#8221; button as shown.</p>
<div id="attachment_433" style="width: 535px" class="wp-caption alignnone"><img class="size-full wp-image-433" title="Quick FTP connect with Filezilla" src="/wp-content/uploads/2011/07/filezilla.gif" alt="Quick FTP connect with Filezilla" width="525" height="444" /><p class="wp-caption-text">Quick FTP connect with Filezilla</p></div>
<p><strong>Step 4:</strong> The pane on the left shows your local disk.   The pane on the right shows your webserver.  In the left pane, navigate  to the files you want to upload.  Using the left pane and then drag  those files from the left pane to the right pane.</p>
<p><strong>Step 5:</strong> When done, disconnect the connection to the server by clicking the disconnect icon.</p>
<p>More info&#8230;</p>
<ul>
<li><a href="http://www.hostmonstertutorials.com/filezilla/">Hostmonster&#8217;s Video Tutorial on downloading and using FileZilla</a></li>
<li><a href="http://filezilla.sourceforge.net/documentation/">FileZilla Documentation</a></li>
<li><a href="http://www.velnetsupport.co.uk/parrots/FTP/Filezilla/">Using FileZilla Site Manager to remember connection info</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/quick-ftp-connect-filezilla/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial to create a Simple Joomla Plugin</title>
		<link>https://learnwebdesignonline.com/tutorial-joomla-plugin</link>
		<comments>https://learnwebdesignonline.com/tutorial-joomla-plugin#comments</comments>
		<pubDate>Mon, 25 Jul 2011 01:42:55 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[joomla]]></category>

		<guid isPermaLink="false">https://learnwebdesignonline.com/?p=420</guid>
		<description><![CDATA[For the purpose of this tutorial example, we will create a Joomla plugin that will alter the title tag of pages of a Joomla 1.5 website. The text surrounded by the title tags in the HTML code is what the browser will display in the browser window frame and browser tabs. By default, Joomla sets [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>For the purpose of this tutorial example, we will create a Joomla  plugin that will alter the title tag of pages of a Joomla 1.5 website.</p>
<p>The text surrounded by the title tags in the HTML code is what the  browser will display in the browser window frame and browser tabs.</p>
<div id="attachment_421" style="width: 530px" class="wp-caption alignnone"><img class="size-full wp-image-421 " title="Joomla title tag plugin" src="/wp-content/uploads/2011/07/joomla-title-tag.jpg" alt="Joomla title tag plugin" width="520" height="328" /><p class="wp-caption-text">Joomla title tag</p></div>
<p>By default, Joomla sets the title tag to be the title of the article  being displayed.  We want to create a plugin that will append our site  name at the end of the title tag as in &#8230;</p>
<div id="attachment_422" style="width: 522px" class="wp-caption alignnone"><img class="size-full wp-image-422" title="sitename added to title tag" src="/wp-content/uploads/2011/07/sitename-added-title.jpg" alt="sitename added to title tag" width="512" height="338" /><p class="wp-caption-text">sitename added to title tag</p></div>
<p>For the purposes of this example, the site name is &#8220;Demo Joomla Site&#8221;.</p>
<h2>Do Not Modify Core Joomla Code</h2>
<p>The core Joomla code that controls the output of the title tag is found in &#8230;<br />
<strong>libraries/joomla/document/html/renderer/head.php</strong></p>
<p>However, it is not considered good practice to alter this file here.    Because an Joomla upgrade may wipe out your changes to that file.   Altering core Joomla files to get the behavioral changes you want is  sometimes known as a &#8220;hack&#8221;.</p>
<h2>Better to Create a Joomla Plugin</h2>
<p>Instead, a better way is to create a Joomla plugin that will add our  site name to this output without modifying the Joomla core code. We will be inserting new files into the Joomla system instead of altering any  existing Joomla files. We  will call our plugin &#8220;SiteNameInTitle&#8221;.</p>
<p>1.  Plugins can be in any of the nine plugin groups shown below in the Joomla file system.</p>
<div id="attachment_423" style="width: 320px" class="wp-caption alignnone"><img class="size-full wp-image-423" title="Joomla plugin groups" src="/wp-content/uploads/2011/07/plugin-groups.jpg" alt="Joomla plugin groups" width="310" height="566" /><p class="wp-caption-text">Joomla plugin groups</p></div>
<p>We will put our plugin into the &#8220;system&#8221; group.  So we create two files (<strong>sitenameintitle.xml</strong> and <strong>sitenameintitle.php</strong> within the system folder on our local computer (not on the webhost  yet).  I like to keep all the characters of the filename in lowercase.</p>
<p>2.  The <strong>sitenameintitle.xml</strong> is the plugin installer file.  Make it look similar to the following with your own relevant information.</p>
<div id="attachment_424" style="width: 529px" class="wp-caption alignnone"><img class="size-full wp-image-424" title="Joomla plugin xml file" src="/wp-content/uploads/2011/07/plugin-xml-file.jpg" alt="Joomla plugin xml file" width="519" height="275" /><p class="wp-caption-text">Joomla plugin xml file</p></div>
<p>The name of our plugin is highlighted in the above.  Also note that we put <strong>group=&#8221;system&#8221;</strong> and the reference to our second file <strong>sitenameintitle.php</strong></p>
<p>3.  For our second file <strong>sitenameintitle.php</strong>, we put the following &#8230;</p>
<div id="attachment_425" style="width: 459px" class="wp-caption alignnone"><img class="size-full wp-image-425" title="Joomla plugin code" src="/wp-content/uploads/2011/07/plugin-code.jpg" alt="Joomla plugin code" width="449" height="611" /><p class="wp-caption-text">Joomla plugin code</p></div>
<p>We create a class <strong>plgSystemSiteNameInTitle</strong> which extends <strong>JPlugin</strong>.  The class name is constructed by convention to start with <strong>plg</strong> to indicate a plugin followed by the plugin group and by the plugin name.</p>
<p>4. Inside the class, we have a function <strong>onAfterDispatch()</strong> to handle the event.</p>
<p>First we get our document object by &#8230;<br />
<strong>$document = &amp; JFactory::getDocument();</strong><br />
We need this to access our title.</p>
<p>We handle the event <strong>onAfterDispatch</strong> by setting the document title to whatever the document title is currently suffixed by the site name &#8230;</p>
<p><strong>$document-&gt;setTitle($document-&gt;getTitle() . &#8216; &#8211; &#8216; . $mainframe-&gt;getCfg(&#8216;sitename&#8217;));</strong></p>
<p>We use <strong>$document-&gt;getTitle()</strong> to get our current  title.  We concatenate it with a hyphen.  And we get the site name as  configured in the Joomla administrator via <strong>$mainframe-&gt;getCfg(&#8216;sitename&#8217;)</strong></p>
<p>Then we use <strong>$document-&gt;setTitle</strong> to set the new title.</p>
<p>5.  Now zip the two files up into a zip file called <strong>sitenameintitle.zip</strong></p>
<p>6.  In your Joomla <strong>Administrator -&gt; Extensions -&gt; Install</strong>, browse to pick up the <strong>sienameintitle.zip</strong> and click <strong>Upload File and Install</strong></p>
<div id="attachment_427" style="width: 530px" class="wp-caption alignnone"><img class="size-full wp-image-427" title="upload and install plugin" src="/wp-content/uploads/2011/07/upload-install.jpg" alt="upload and install plugin" width="520" height="256" /><p class="wp-caption-text">upload and install plugin</p></div>
<p>7.  You should see &#8220;Install Plugin Success&#8221;.  Note the plugin description from the XML file is also shown here.</p>
<div id="attachment_428" style="width: 530px" class="wp-caption alignnone"><img class="size-full wp-image-428" title="Joomla plugin successful" src="/wp-content/uploads/2011/07/plugin-install-success.jpg" alt="Joomla plugin successful" width="520" height="259" /><p class="wp-caption-text">Joomla plugin successful</p></div>
<p>Joomla has just unzipped the two files <strong>sitenameintitle.xml</strong> and <strong>sitenameintitle.php</strong> into the <strong>plugins/system</strong> folder on your webhost.</p>
<p>8.  In <strong>Extensions -&gt; Plugin Manager</strong>, find your new plugin and enable it.</p>
<div id="attachment_429" style="width: 529px" class="wp-caption alignnone"><img class="size-full wp-image-429" title="enable Joomla plugin" src="/wp-content/uploads/2011/07/enable-plugin.jpg" alt="enable Joomla plugin" width="519" height="315" /><p class="wp-caption-text">enable Joomla plugin</p></div>
<p>9.  Refresh your browser and see that site name is now added to the title tag&#8230;</p>
<div id="attachment_430" style="width: 522px" class="wp-caption alignnone"><img class="size-full wp-image-430" title="sitename added to title" src="/wp-content/uploads/2011/07/sitename-with-added-title.jpg" alt="sitename added to title" width="512" height="338" /><p class="wp-caption-text">sitename added to title</p></div>
<h2>Notes:</h2>
<p>We can not remove the text &#8220;Mozilla Firefox&#8221; that you see in the  browser frame because that is put there by the browser and not  controlled in the title tag HTML code.</p>
<p>This tutorial refers to Joomla version 1.5.14.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://learnwebdesignonline.com/tutorial-joomla-plugin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
