<?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>code.adonline (Adam Dimech&#039;s coding blog)</title>
	<atom:link href="http://code.adonline.id.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.adonline.id.au</link>
	<description></description>
	<lastBuildDate>Mon, 09 Apr 2012 05:53:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Breaking out of frames</title>
		<link>http://code.adonline.id.au/breaking-out-of-frames/</link>
		<comments>http://code.adonline.id.au/breaking-out-of-frames/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 05:53:19 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=398</guid>
		<description><![CDATA[Prevent your website from displaying within another site's frames. ]]></description>
			<content:encoded><![CDATA[<p>Some websites link to external web pages but keep them trapped within a frame.</p>
<p>Such a technique can be used to continue serving advertisements to an audience that has left a website, to monitor the activity of those people, or otherwise try and claim ownership of content by masking the true URL. Most internet users find this practice annoying.</p>
<p>Additionally, most webmasters resent having their web pages served within someone-else&#8217;s frames. Examples of websites that employ this practice are <a href="http://www.paper.li/" target="_blank">paper.li</a>, <a href="http://www.about.com/" target="_blank">about.com</a> and <a href="http://images.google.com.au/" target="_blank">Google Images</a>.</p>
<p><img class="aligncenter size-full wp-image-399" title="frames" src="http://code.adonline.id.au/wp-content/uploads/frames.png" alt="" width="515" height="390" /></p>
<p>If you run a website and want to make sure that your content can&#8217;t be served within someone-else&#8217;s frame, you can use this simple piece of JavaScript within your site&#8217;s &lt;head&gt; tags:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">	&lt;script type=&quot;text/javascript&quot;&gt;
	&lt;!--
	if (top.location != location) { top.location.href = location.href; }
	//--&gt;
	&lt;/script&gt;</pre></div></div>

<p>Whenever someone tries to access your page from within a frame, the page will automatically reload without the frame so that your website (rightly) occupies the entire browser window.</p>
<p>I find that the easiest way to deploy such a script is to create a file called <strong>noframes.js</strong> and insert the following:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>top.<span style="color: #660066;">location</span> <span style="color: #339933;">!=</span> location<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> top.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> location.<span style="color: #660066;">href</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then that file can be linked-to in the &lt;head&gt; as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/script/noframes.js&quot;&gt;&lt;/script&gt;</pre></div></div>

<p>If you want to confirm that your code is working, the <a href="http://traffichoopla.com/FrameBreakerTest.php">TrafficHoopla Frame Breaker Test</a> is excellent.</p>
<p>Note that this remedy won&#8217;t work for the small number of people who have JavaScript disabled.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/breaking-out-of-frames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Responsive Web Design</title>
		<link>http://code.adonline.id.au/getting-started-with-responsive-web-design/</link>
		<comments>http://code.adonline.id.au/getting-started-with-responsive-web-design/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 01:09:41 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Responsive Web Design]]></category>
		<category><![CDATA[adaptive web design]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[RWD]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=367</guid>
		<description><![CDATA[This article provides new users with ten easy-to-follow steps for designing a website on Responsive Web Design principles from scratch. RWD may look complicated, but this article will make it easy for you. ]]></description>
			<content:encoded><![CDATA[<p>To enable mobile devices to access websites, many web developers have historically created a fixed width web design (typically 980px) and then created a separate dedicated &#8216;mobile&#8217; site for devices. By replacing the ubiquitous &#8216;www&#8217; of the web address with &#8216;m&#8217; (for example, m.adonline.id.au), this system of dual websites was seen as a good way of attracting mobile users to a website.</p>
<p>Unfortunately there are many problems with this approach, in particular:</p>
<ol>
<li>Mobile websites are often designed to a (smaller) fixed width and so despite their purpose, still don&#8217;t look good in all mobile devices.</li>
<li>Having two websites dilutes ones SEO authority.</li>
<li>Browser (user-agent) sniffing is often used to redirect users to either the &#8216;www&#8217; or &#8216;m&#8217; website and this approach is highly unreliable.</li>
</ol>
<p>In May 2010, Ethan Marcotte write an article for <em>A List Apart</em> about a concept he called &#8220;<a href="http://www.alistapart.com/articles/responsive-web-design/" target="_blank">responsive web design</a>&#8220;. In his article, he outlined a method for making a website &#8216;adapt&#8217; to its audience by automatically resizing in response to the browser window in such a way that the same website (and markup) would work equally as well on a desktop as it would a mobile device.</p>
<p>I love both the concept and the philosophy of responsive web design (sometimes called adaptive web design), but it does have its critics and it&#8217;s <a href="http://bradfrostweb.com/blog/web/responsive-web-design-missing-the-point/" target="_blank">not the total solution</a>. In particular, <a href="http://www.viget.com/inspire/is-responsive-design-a-good-fit-for-mobile/" target="_blank">some people</a> have pointed out that one of responsive web design&#8217;s primary tools for resizing images for mobile browsers and devices are either bandwidth-heavy, code-heavy, memory-taxing or <a href="http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/" target="_blank">all three</a>. One has even complained that it <a href="http://www.netmagazine.com/opinions/responsive-web-design-boring" target="_blank">breeds boring websites</a>.</p>
<p>There are also a number of <a href="http://blog.easy-designs.net/archives/2011/11/16/on-adaptive-vs-responsive-web-design/" target="_blank">arcane arguments</a> about &#8216;responsive&#8217; versus &#8216;adaptive&#8217; web design, but for the purposes of this article, I shall steer clear of these debates and proceed with the assumption that the two terms are synonymous.</p>
<p>I will also make the assumption that readers of this post are interested in proceeding with a responsive web design, but don&#8217;t know where to begin.</p>
<p>Beginning a responsive web site can be tricky, and it took me ages to create <a href="http://www.adamdimech.com/english/" target="_blank">this rather simple website</a> using this new approach. Nevertheless, I learnt a great deal from this exercise and this article will serve as a good starting point so that designers can get their head around some of the key concepts and approaches.</p>
<h3>Step 1: Change your thinking!</h3>
<p>Many web designers have adapted to the changing demands of coding sites that validate with the <a href="http://validator.w3.org/" target="_blank">W3C validator</a>, rather than using proprietary code. Designers have also adjusted to CSS3 and HTML5. Responsive web design is another significant change from the old, familiar ways.</p>
<p>In the past, you would have set-up DIV elements with fixed width. With responsive web design (RWD), you will need to forget absolutes. Your dimensions will mostly be <em>relative</em>. Whilst this can be a big mental hurdle to leap over it&#8217;s integral to RWD.</p>
<p>In creating RWD site, you will need to envisage that a large proportion of your site&#8217;s users will be navigating with their fingers and not their mouse. Consequently, mouseovers out and some buttons, links, menus and features will need to be reconfigured.</p>
<h3>Step 2: Bookmark some useful tools</h3>
<p>Emulators make the testing of your website easy and allow developers to get a rough idea of how a site will look without having to purchase multiple devices or incurring data charges</p>
<p>Emulators aren&#8217;t foolproof but I have found these to be generally reliable and accurate:</p>
<ul>
<li><a href="http://www.testiphone.com/" target="_blank">iPhone emulator</a></li>
<li><a href="http://ipad-emulator.org/" target="_blank">iPad emulator</a> (the iPhone emulator on this site doesn&#8217;t work reliably)</li>
<li><a href="http://www.opera.com/developer/tools/mini/" target="_blank">Opera Mini Simulator</a></li>
</ul>
<p>For checking designs in older versions of Internet Explorer, I have <a href="http://code.adonline.id.au/netrenderer-takes-a-rest/" target="_blank">always found</a> that the <a href="http://netrenderer.com/" target="_blank">NetRenderer</a> to be reliable.</p>
<h3>Step 3: Fix the viewport</h3>
<p>The first practical step when creating a RWD site  is to tell mobile browsers not to resize your website. Normally when you load a website on a mobile device, the page will be shrunk so that it fits into the browser window. The user then manually zooms in. This makes sense for a 980px-width website but many devices will even do this for your mobile-ready website.</p>
<p>The trick here is to add this line of code into your &lt;head&gt;.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;meta content=&quot;width=device-width, initial-scale=1.0&quot; name=&quot;viewport&quot;&gt;</pre></div></div>

<p>This piece of valid code tells mobile devices not to zoom out as a default.</p>
<h3>Step 4: Install ImgSizer.js</h3>
<p>These days, images form a major part of most website&#8217;s presentation. Unfortunately the bulk of images are too big to fit on a mobile browser. Thankfully Ethan Marcotte has developed a script called <a href="http://unstoppablerobotninja.com/entry/fluid-images/" target="_blank">ImgSizer.js</a> that will resize the images on your page relative to the browser window width. You can see it in action at <a href="http://www.adamdimech.com/english/">adamdimech.com/english</a>.</p>
<p>Marcotte has bundled his JavaScript code into a <a href="http://unstoppablerobotninja.com/demos/resize/imgSizer.js" target="_blank">single file</a> which can be <a href="http://unstoppablerobotninja.com/demos/resize/imgSizer.js" target="_blank">downloaded from his site</a>.</p>
<p>The code doesn&#8217;t work in IE6 or less, so I suggest the following conditionally-commented code in your &lt;head&gt; be used to implement the JavaScript on your RWD website:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if ! lte IE 6]&gt;&lt;!--&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.example.com/js/img-sizer.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    addLoadEvent(function() {
         if (document.getElementById &amp;&amp; document.getElementsByTagName) {
              var aImgs = document.getElementById(&quot;content&quot;).getElementsByTagName(&quot;img&quot;);
              imgSizer.collate(aImgs);
         }
    });
&lt;/script&gt;
&lt;!--&lt;![endif]--&gt;</pre></div></div>

<p>If you have a general hatred of IE6 (as I do), then  you can dispense with the conditional comments.</p>
<h3>Step 5: Install css3-mediaqueries.js</h3>
<p>You will need to use <a href="http://www.w3.org/TR/css3-mediaqueries/" target="_blank">CSS3 media queries</a>, but many older browsers won&#8217;t natively support these. Thankfully, Wouter van der Graaf came to the rescue with his <a href="http://code.google.com/p/css3-mediaqueries-js/" target="_blank">css3-mediaqueries.js</a> code, which will allow all browsers to support media queries in CSS.</p>
<p>Wouter suggests that the JavaScript file be <a href="http://www.minifyjs.com/javascript-compressor/" target="_blank">minified</a> and added immediately prior to the &lt;body&gt; tag within the &lt;head&gt;. You can download it <a href="http://code.google.com/p/css3-mediaqueries-js/" target="_blank">here</a>.</p>
<p>Because IE9 fully supports CSS3, I use a conditional comment so that only older versions of IE will download the script.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!--[if lt IE 9]&gt;
	&lt;script src=&quot;http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;</pre></div></div>

<h3>Step 6: Commence with some CSS housekeeping</h3>
<p>Before we begin our CSS formatting, we need to prepare our page for RWD.</p>
<p>The first  part is to condition our &lt;body&gt; tag in CSS so that there are no margins and the height will always remain 100% of the screen. This will ensure that the greatest amount of screen is available for use.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">html<span style="color: #00AA00;">,</span> body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>In order for images to fit within any screen, they need to be scaled. There are several ways to do this (aside from using ImgSizer.js) but a good starting point is to make all images have a width of 100%. No height value is necessary; the browser determines the height that will proportionately constrain the image’s dimensions. As long as no other width-based image styles override this rule, every image will load to the width of its containing DIV unless the viewing area becomes narrower than the image’s original width.</p>
<p>Using a 100% image width in combination with a containing div and ImgSizer will ensure images scale beautifully.</p>
<p>Unfortunately, max-width is not supported in older versions of Internet Explorer, so a conditional comment is also included, denoted with an <a href="http://code.adonline.id.au/conditional-comments-in-css-for-internet-explorer/">asterisk</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">img <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">*</span>img <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The last step is to ensure that a vertical scroll bar is always displayed in the browser. Because the proportions of the website are all relative, the sudden appearance of a scroll bar (which could be triggered by an interactive component on your website) will cause your site to jump. In CSS, we can use <a href="http://code.adonline.id.au/make-a-browser-scrollbar-always-appear/">this simple trick</a> to ensure that the bar is always there, thus preventing jumping.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">html <span style="color: #00AA00;">&#123;</span> overflow-y<span style="color: #00AA00;">:</span> <span style="color: #993333;">scroll</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<h3>Step 7: Design your container &lt;div&gt;</h3>
<p>Whether you use <a href="http://www.microsoft.com/expression/products/web_overview.aspx" target="_blank">Microsoft Expression Web</a>, <a href="http://www.adobe.com/products/dreamweaver/" target="_blank">Adobe Dreamweaver</a> or another programme for designing your pages, you may find that some of the following code does some strange things to your WYSIWYG interface. Of course these aren&#8217;t WYSIWYG design tools, so the golden rule is to test and retest within a server environment, using multiple browsers.</p>
<p>To design my website, I am going to use a fluid layout but I am also going to utilise the max-width feature of CSS3. This is important because once a page moves beyond a certain width, reading becomes difficult. So max-width shall be used to ensure that the site doesn&#8217;t expand to 100% on really large desktop monitors.</p>
<p>To begin my page, I shall create a container div, to which I shall assign the ID &#8220;#container&#8221;.</p>
<p>This is my complete page code so far:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en-au&quot;&gt;
&nbsp;
&lt;head&gt;
&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;title&gt;Page Title&lt;/title&gt;
&lt;meta content=&quot;width=device-width, initial-scale=1.0&quot; name=&quot;viewport&quot;&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;path/to/stylesheet.css&quot; type=&quot;text/css&quot; media=&quot;all&quot; /&gt;
&nbsp;
&lt;!--[if lt IE 9]&gt;
&lt;script src=&quot;path/to/css3-mediaqueries.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
&nbsp;
&lt;!--[if ! lte IE 6]&gt;&lt;!--&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;path/to/img-sizr.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    addLoadEvent(function() {
         if (document.getElementById &amp;&amp; document.getElementsByTagName) {
              var aImgs = document.getElementById(&quot;content&quot;).getElementsByTagName(&quot;img&quot;);
              imgSizer.collate(aImgs);
         }
    });
&lt;/script&gt;
&lt;!--&lt;![endif]--&gt;
&nbsp;
&lt;/head&gt;
&nbsp;
&lt;body id=&quot;body&quot;&gt;
&nbsp;
&lt;div id=&quot;container&quot;&gt;
&lt;/div&gt;
&nbsp;
&lt;/body&gt;
&nbsp;
&lt;/html&gt;</pre></div></div>

<p>The CSS code for #container is thus:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #993333;">auto</span> <span style="color: #933;">0px</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">90%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">980px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">min-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">120px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>When using a fixed-width design in the past, my #container &lt;div&gt; would be 980px wide. In this RWD code, you will see that I have used the max-width attribute to ensure that the #container &lt;div&gt; doesn&#8217;t exceed 980px but can be reduced to 120px. You do not need to set a max-width for a website (or an element), but if you have a lot of text, it&#8217;s worth considering to <a href="http://baymard.com/blog/line-length-readability" target="_blank">ensure the site&#8217;s readability</a>. Ultimately this decision will depend on the nature of your site&#8217;s content. In any case, one doesn&#8217;t need to state the relative width of the #container &lt;div&gt; as the browser will assume that it&#8217;s 100% unless it&#8217;s specified by the max-width, where applicable. This enables the  site&#8217;s fluidity.</p>
<p>You will also see that the #container &lt;div&gt; has automatic left and right margins, to ensure that it floats in the middle of the page.</p>
<h3>Step 8: Design your structural &lt;div&gt; elements</h3>
<p>From here, you can design the rest of the structural elements of your website. There are several approaches to this.</p>
<p>One method suggests that beginners create fixed-width &lt;div&gt; elements, then convert the fixed-widths to percentages. The logic behind this is very sound and I can say that I have used this technique with much success. That said, one will quickly develop the ability to work in percentages rather than pixels and it will all become second nature.</p>
<p>The following is some sample CSS code for creating two columns:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#two-columns</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span>
.column-<span style="color: #000000; font-weight: bold;">left</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">70%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
.column-<span style="color: #000000; font-weight: bold;">right</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">80%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Both columns are contained within the #two-columns &lt;div&gt;. This ensures that the column &lt;div&gt; elements are kept together and the 100% width ensures that they don&#8217;t break out of the #container &lt;div&gt;. The column on the left has a width of 70% whilst the one on the right has a width of 30%. Both of these widths are relative to #two-columns, which itself is 100% of the width of #container.</p>
<h3>Step 9: Make your design more fluid with @media queries</h3>
<p>The above design may look good on a desktop with a screen width of 1100px or 800 px or even on an iPad. But how will it look on an iPhone with a screen width of 320 px? An iPhone viewer would see the above website with a left column of 224 px and a right column of just 96 px, which is very small indeed.</p>
<p>One way to get around this is to change the presentation of a website, depending on the viewing size. To do this, we use @media queries in CSS3. Because css3-mediaqueries.js has been installed (as per Step 5), @media queries will be supported by all major browsers (including IE7 and above).</p>
<p>Using the above example, we may wish to tell the browser that we&#8217;ll display two columns where the width is greater than 450 px. If it becomes less than this, we shall stack the information into two blocks instead:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#two-columns</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span>
&nbsp;
.column-<span style="color: #000000; font-weight: bold;">left</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
.column-<span style="color: #000000; font-weight: bold;">right</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #a1a100;">@media screen and (min-width: 450px) /* Controls when screen greater than 450px */ {</span>
.column-<span style="color: #000000; font-weight: bold;">left</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">70%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
.column-<span style="color: #000000; font-weight: bold;">right</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">80%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #a1a100;">@media screen and (max-width: 450px) /* Controls when screen less than 450px */ {</span>
.column-<span style="color: #000000; font-weight: bold;">left</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">4%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
.column-<span style="color: #000000; font-weight: bold;">right</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If you look very carefully, you will see that the CSS code is broken into three sections:</p>
<ol>
<li>Style information that applies regardless of the screen width (all of #two-columns and the position attribute of .column-left and .column-right.</li>
<li>Style information that applies where the screen is more than 450px.</li>
<li>Style information that applies where the screen is less than 450px.</li>
</ol>
<p>You will notice that some of the attributes change  because the layout has changed. In graphical terms, this is what we want to achieve:</p>
<p><img class="aligncenter size-full wp-image-385" title="responsive-design-columns" src="http://code.adonline.id.au/wp-content/uploads/responsive-design-columns.png" alt="" width="448" height="262" /></p>
<p>You can see that by using the @media queries, one can re-organise the layout of elements to better suit the screen width. This need not simply apply to column sizes.</p>
<p>One can also use @media queries to change font sizes, depending on the screen width. In the example below, the font is 20px when the screen is more than 150px, 22px when it&#8217;s more than 600px wide and 30px when the screen width is greater than 750px.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@media screen and (min-width: 150px) {</span>
<span style="color: #6666ff;">.article</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #a1a100;">@media screen and (min-width: 600px) {</span>
<span style="color: #6666ff;">.article</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">22px</span><span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #a1a100;">@media screen and (min-width: 750px) {</span>
<span style="color: #6666ff;">.article</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Or one can display or hide elements too. In this example, the &#8216;story&#8217; element is hidden when the screen width is less than 500px.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@media screen and (max-width: 500px) {</span>
<span style="color: #6666ff;">.story</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>You can also hide images, but be careful because in most circumstances, the iPhone will <a href="http://cloudfour.com/examples/mediaqueries/image-test/" target="_blank">still download a hidden image</a> (thus increasing page load times).</p>
<p>The opportunities for creativity with @media queries are endless.</p>
<h3>Step 10: Step back and analyse</h3>
<p>Responsive web design is a brilliant tool for making websites universally accessible, but there are some limitations to its functionality.</p>
<p>For instance, many websites employ horizontal drop-down menus. Whilst these can be adapted for RWD, this can be a very complicated and tricky procedure that needs a lot of testing to ensure universal functionality.</p>
<p>In any case, and despite your best efforts, elements will compress differently as the screen width reduces and so the positioning of images may shift a bit. Therefore, you will need to test your website carefully and satisfy yourself that the images are in the correct positions for all screen widths and for all browsers.</p>
<p>Finally, one needs to be careful about bandwidth. Images make websites look great, but they vastly increase download times, which are even worse on portable devices. The creation of a RWD website gives one an opportunity to review what is and what isn&#8217;t important in terms of content on a page.</p>
<p>This article is designed to provide users with a beginning point for creating a website using Responsive Web Design principles. If you follow these 10 steps, you&#8217;ll be well on your way to creating an impressive RWD site.</p>
<p>If you have any comments or questions, feel free to leave a comment at the bottom of this page. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/getting-started-with-responsive-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use PHP to ensure a page can only be accessed via a specific URL</title>
		<link>http://code.adonline.id.au/use-php-to-ensure-a-page-can-only-be-accessed-via-a-specific-url/</link>
		<comments>http://code.adonline.id.au/use-php-to-ensure-a-page-can-only-be-accessed-via-a-specific-url/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 00:04:02 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[hyperlink]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[referer]]></category>
		<category><![CDATA[referrer]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=355</guid>
		<description><![CDATA[Use this handy PHP script to redirect visitors who access a web page via an external link or by typing the URL directly into their browser. ]]></description>
			<content:encoded><![CDATA[<p>A situation recently arose where I wanted to redirect <em>all</em> traffic that accessed a certain URL (either directly or via an external site)  <em>unless</em> that traffic arrived via a hyperlink on my website.</p>
<p>The following PHP script will perform the following functions:</p>
<ol>
<li>Check the HTTP referrer to see whether the visitor has come from a page on an approved website (host)</li>
<li>If the visitor has come from an approved website, display the page content</li>
<li>If the referrer page is unapproved, redirect to another defined page</li>
<li>If a direct call is made for the page, redirect to another defined page as if the page was accessed from an external link.</li>
</ol>
<p>This simple script is ideal for &#8216;presentation&#8217; purposes but should not be used where security is an important concern as referrer data <a href="http://en.wikipedia.org/wiki/Referrer_spoofing" target="_blank">can be spoofed</a>.</p>
<p>The following code should be added at the <em>very top</em> of a PHP file, even before the &lt;!DOCTYPE&gt;:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$referer</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_REFERER'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$referer_parse</span> <span style="color: #339933;">=</span> <span style="color: #990000;">parse_url</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$referer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$referer_parse</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'host'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;example.com&quot;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$referer_parse</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'host'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;www.example.com&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #666666; font-style: italic;">// Page content will display</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: http://www.example.com/redirected-page&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You will need to replace &#8220;example.com&#8221; and &#8220;www.example.com&#8221; with your website (assuming you only want to permit links from your own website). Otherwise add the hostnames of websites from which you will accept referrer traffic.</p>
<p>You will then need to replace &#8220;http://www.example.com/redirected-page&#8221; with the URL of a page that you wish to redirect people to if they enter the page&#8217;s URL directly, or access the page from an &#8216;unapproved&#8217; link.</p>
<p>Now, if people try to access the page directly or via an external link, they will instantly be redirected to another page.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/use-php-to-ensure-a-page-can-only-be-accessed-via-a-specific-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Renewing Avast antivirus</title>
		<link>http://code.adonline.id.au/renewing-avast-antivirus/</link>
		<comments>http://code.adonline.id.au/renewing-avast-antivirus/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 21:47:56 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[antivirus]]></category>
		<category><![CDATA[avast]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[renew]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=343</guid>
		<description><![CDATA[Five simple steps to renew your free copy of Avast antivirus for home use. ]]></description>
			<content:encoded><![CDATA[<p>Avast is a <a href="http://www.avast.com/en-au/free-antivirus-download" target="_blank">free antivirus programme</a> for home-use desktop computers. In order to use the programme, it requires annual registration.</p>
<p>Thirty days prior to the expiration of the programme&#8217;s registration, users will receive an email notice asking for the registration to be renewed. If, like me, you&#8217;d prefer not to follow email links for security reasons, you can update your registration manually using the following 5-step method:</p>
<h3>Step 1:</h3>
<p>Open Avast antivirus by going to Start &gt; All Programs &gt; avast! Free Antivirus &gt; avast! Free Antivirus in Windows 7. Click on the &#8220;Maintenance&#8221; tab on the left-side panel of Avast.</p>
<p><img class="aligncenter size-full wp-image-344" title="update-avast-01" src="http://code.adonline.id.au/wp-content/uploads/update-avast-01.png" alt="" width="515" height="390" /></p>
<h3>Step 2:</h3>
<p>Click on the &#8220;Registration&#8221; tab, then the &#8220;Register now&#8221; button in the middle of the window:</p>
<p><img class="aligncenter size-full wp-image-346" title="update-avast-03" src="http://code.adonline.id.au/wp-content/uploads/update-avast-03.png" alt="" width="515" height="390" /></p>
<p>&nbsp;</p>
<h3>Step 3:</h3>
<p>A new window will pop-up. Choose &#8220;Select&#8221; under &#8220;Base Protection&#8221; for the free version of the antivirus.</p>
<p><img class="aligncenter size-full wp-image-347" title="update-avast-04" src="http://code.adonline.id.au/wp-content/uploads/update-avast-04.png" alt="" width="515" height="318" /></p>
<h3>Step 4:</h3>
<p>Enter your personal details in the registration form. Then press &#8220;Register for Free Licence&#8221;</p>
<p><img class="aligncenter size-full wp-image-349" title="update-avast-05" src="http://code.adonline.id.au/wp-content/uploads/update-avast-05.png" alt="" width="514" height="398" /></p>
<h3>Step 5:</h3>
<p>After processing, you should receive a confirmation message as shown below. Simply close the smaller window by clicking on the red X at the top right-hand corner of the window to see Avast&#8217;s new registration expiration date.</p>
<p><img class="aligncenter size-full wp-image-350" title="update-avast-06" src="http://code.adonline.id.au/wp-content/uploads/update-avast-06.png" alt="" width="515" height="390" /></p>
<p>Your copy of Avast is now fully-updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/renewing-avast-antivirus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create a clickable corner ribbon for your website</title>
		<link>http://code.adonline.id.au/clickable-corner-ribbon/</link>
		<comments>http://code.adonline.id.au/clickable-corner-ribbon/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 13:11:46 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[advertisement]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[cause]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[corner banner]]></category>
		<category><![CDATA[corner ribbon]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[promotional]]></category>
		<category><![CDATA[ribbon]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=327</guid>
		<description><![CDATA[Using CSS and simple HTML, easily create a promotional "ribbon" in the corner of your website that will link to another page.]]></description>
			<content:encoded><![CDATA[<p>Sometimes the situation may arise when a website owner wants to add a promotional &#8216;corner ribbon&#8217; or &#8216;corner banner&#8217; to their website. This may be to promote a special event, a charitable cause or to generate sales during a special campaign.</p>
<p>This tutorial will show you how to make an unobtrusive but eye-catching promotional ribbon for your website that:</p>
<ul>
<li>Is positioned in the top-right corner of the browser window.</li>
<li>Does not disappear when the person scrolls down (ie: it floats).</li>
<li>Will hyperlink to another internal or external page.</li>
<li>Will display correctly in all browsers.</li>
</ul>
<h3>Step 1: Create the ribbon</h3>
<p>Using a graphic software programme such as <a href="http://www.adobe.com/products/photoshop/" target="_blank">Adobe Photoshop</a>, <a href="http://www.corel.com/corel/product/index.jsp?pid=prod3430246" target="_blank">Corel PhotoImpact</a> or <a href="http://www.gimp.org/" target="_blank">Gimp</a>, create a transparent image measuring 170×170 pixels.</p>
<p>Create your ribbon to a design of your choice. The ribbon would normally be tilted at a 45° angle. Your ribbon might look something like this within your graphics package:</p>
<p><img class="aligncenter size-full wp-image-329" title="website-ribbon-1" src="http://code.adonline.id.au/wp-content/uploads/website-ribbon-1.jpg" alt="" width="181" height="182" /></p>
<p>The chequered pattern represents the transparent area and the border the edge of the image.</p>
<p><em><strong>Important:</strong></em> Save your image in PNG format. This preserves the transparency around your ribbon.</p>
<p>Upload your ribbon to your web server via FTP.</p>
<h3>Step 2: Create your Style Sheet</h3>
<p>Create a new CSS file and add the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#ribbon</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">10000</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The class identifier has been named &#8220;ribbon&#8221; and the <a href="http://www.w3schools.com/cssref/pr_pos_z-index.asp" target="_blank">z-index</a> value set to 10,000 to (hopefully) ensure that the ribbon displays above all other content on the website.</p>
<p>Save the file as &#8220;ribbon.css&#8221; and upload to your server via FTP.</p>
<h3>Step 3: Reference your style sheet within your &lt;head&gt; tags.</h3>
<p>The following piece of HTML should be included within your &lt;head&gt; tags.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; href=&quot;/path/to/ribbon.css&quot; type=&quot;text/css&quot; /&gt;</pre></div></div>

<p>Simply change the href value to point to the location of your ribbon.css file. You can use a relative or absolute link.</p>
<h3>Step 4: Include the ribbon within your &lt;body&gt; tags.</h3>
<p>Include the following code anywhere within the &lt;body&gt; of your HTML file.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a id=&quot;ribbon&quot; href=&quot;http://www.example.com/&quot; target=&quot;_blank&quot;&gt;
&lt;img alt=&quot;Alternative Text&quot; src=&quot;/path/to/ribbon.png&quot; width=&quot;170 height=&quot;170&quot;&gt;
&lt;/a&gt;</pre></div></div>

<p>The &#8216;ribbon&#8217; class ID ensures that the ribbon is placed at the top right-hand side of the browser window. You will need to change the URL that the ribbon points to when clicked. You should also change the &lt;img alt&gt; value to something more meaningful. If you don&#8217;t want the hyperlink to open in a new tab/window, delete target=&#8221;_blank&#8221;. Finally, check that the code correctly points to your ribbon PNG file from Step 1.</p>
<p>That&#8217;s it!</p>
<p>Your page should now display your ribbon in the top right-hand corner. When clicked, the browser should open a new window to a page of your choosing.</p>
<h3>Variations</h3>
<p>You can use a ribbon with different dimensions, but ensure you change the height and width values of the code in Step 4.</p>
<h3>PNG Files and Internet Explorer 6</h3>
<p>Internet Explorer 6 doesn&#8217;t display PNG files correctly (the transparent area will appear grey).</p>
<p>In 2012, I believe that Internet Explorer 6 is not worth concerning oneself with but if the prospect of PNG files displaying incorrectly for the <a href="http://code.adonline.id.au/my-web-stats-browser-operating-system-usage/" target="_blank">few remaining IE6 users</a> bothers you, simply use the <a href="http://24ways.org/2007/supersleight-transparent-png-in-ie6" target="_blank">SuperSleight</a> jQuery script.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/clickable-corner-ribbon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SOPA and PIPA: Taking Action</title>
		<link>http://code.adonline.id.au/sopa-and-pipa/</link>
		<comments>http://code.adonline.id.au/sopa-and-pipa/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 12:52:42 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[censorship]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[PIPA]]></category>
		<category><![CDATA[piracy]]></category>
		<category><![CDATA[PROTECT IP Act]]></category>
		<category><![CDATA[protest]]></category>
		<category><![CDATA[SOPA]]></category>
		<category><![CDATA[Stop Online Piracy Act]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=315</guid>
		<description><![CDATA[Proposed US laws could make it an offence to merely link to a website with unlicenced copyright material, with a gaol sentence resulting for those convicted of distributing unlicenced copyright material.]]></description>
			<content:encoded><![CDATA[<p>Today, many of the world&#8217;s biggest websites will be taking action to protest the proposed <a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act" target="_blank"><em>Stop Online Piracy Act</em></a> (SOPA) and<em> <a href="http://en.wikipedia.org/wiki/PROTECT_IP_Act" target="_blank">Preventing Real Online Threats to Economic Creativity and Theft of Intellectual Property Act</a></em> (PIPA) bills which are being debated in the US congress.</p>
<p>Major websites taking action include <a href="http://blog.flickr.net/en/2012/01/18/pipa-sopa/">Flickr</a>, <a href="https://www.google.com/landing/takeaction/" target="_blank">Google</a>, <a href="http://twitpic.com/sopapipa" target="_blank">TwitPic </a>and <a href="http://wordpress.org/news/2012/01/internet-blackout/" target="_blank">WordPress</a>. Wikipedia has commenced a <a href="http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more" target="_blank">24-hour shutdown</a>.</p>
<p><img class="aligncenter size-full wp-image-316" title="wikipedia-sopa" src="http://code.adonline.id.au/wp-content/uploads/wikipedia-sopa1.png" alt="" width="501" height="378" /></p>
<p>SOPA and PIPA are designed to prevent online piracy and copyright breaches by taking a heavy-handed approach to enforcement. This could have the effect of censoring many US websites.</p>
<p>Even for those of us in Australia, SOPA and PIPA could have the effect of reducing traffic from the USA and even lead to <a href="http://www.heraldsun.com.au/technology/wikipedia-google-twitter-facebook-boingboing-act-against-sopa-pipa/story-fn7celvh-1226247231102" target="_blank">gaol terms for Australians</a>.</p>
<p>In essence, the laws mean that:</p>
<ul>
<li>Websites that host any material that is copyright can be taken down (rather than having the offending content removed)</li>
<li>Website owners who host unlicenced copyright content could face gaol sentences.</li>
<li>It would be <a href="http://www.digtriad.com/news/article/209481/175/What-Is-The-Fuss-Over-SOPA-And-PIPA" target="_blank">an offence to link to a website</a> with unlicenced copyright material.</li>
<li>Internet service providers will be required to take action against website owners who breach copyright.</li>
<li>American citizens would be blocked from accessing sites that are alleged <em>or</em> guilty of hosting copyright material.</li>
<li>Australian (and other citizens) who have affected sites could have them blocked to US-citizens, taken down (if hosted in the United States) or even face gaol terms if they travel to the US and are found to be guilty.</li>
</ul>
<p>The websites who are protesting SOPA and PIPA believe that internet piracy and intellectual property theft are serious and legitimate issues that need to be tackled. I also support this position.</p>
<p>Whilst I am not directly affected, I can see the <a href="http://www.whitehouse.gov/blog/2012/01/14/obama-administration-responds-we-people-petitions-sopa-and-online-piracy">damaging effect</a> these laws could have on freedom of speech, entrepreneurialism and information sharing globally.<em> The Guardian</em> newspaper provides <a href="http://www.guardian.co.uk/world/interactive/2011/dec/23/sopa-stop-online-piracy-act" target="_blank">a good explanatory video</a> of how it will work.</p>
<p>Today, I am supporting the protests by adding a banner to my website so that more people may be aware of the implications of these draconian laws. I have also <a href="http://blog.flickr.net/en/2012/01/18/pipa-sopa/" target="_blank">blacked-out</a> my 10 most popular pictures on Flickr.</p>
<p>More information about the Stop SOPA/PIPA campaign can be found at <a href="http://americancensorship.org/" target="_blank">AmericanCensorship.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/sopa-and-pipa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Safely add any font to your website using CSS</title>
		<link>http://code.adonline.id.au/safely-add-any-font-to-your-website/</link>
		<comments>http://code.adonline.id.au/safely-add-any-font-to-your-website/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:45:12 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[eot]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[opentype]]></category>
		<category><![CDATA[otf]]></category>
		<category><![CDATA[truetype]]></category>
		<category><![CDATA[ttf]]></category>
		<category><![CDATA[typography]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=294</guid>
		<description><![CDATA[Using @font-face in CSS3, you can easily add any font to your website and be certain that all of your users will see your custom font.]]></description>
			<content:encoded><![CDATA[<p>It sometimes becomes desirable to include a custom font into a website&#8217;s design. Conventional wisdom says that this isn&#8217;t possible because the only fonts available are those on an end-user&#8217;s computer. This is not true.</p>
<p>It is possible to safely deliver a font from the server side, as long as the following workflow is followed:</p>
<h3>Step 1: Consider the need to use a custom font.</h3>
<p>In all honesty, I would carefully consider the following factors before using a custom font on your website:</p>
<ol>
<li>Special fonts slow page loading times</li>
<li>A lengthy work-flow is involved</li>
<li>Some fonts will display sub-optimally in some browsers</li>
<li>Some fonts are copyright and require a licence fee to be paid (this is important!)</li>
</ol>
<p>If you still believe that a custom font is required on your website, continue with Step 2.</p>
<h3>Step 2: Convert fonts to browser-supported formats</h3>
<p>Mozilla Firefox, Google Chrome, Opera and Apple Safari will all support True-Type (.ttf) fonts. Unfortunately, Microsoft Internet Explorer does not support the TrueType font format.</p>
<p>In order for your font to be visible in all browsers, you will need to convert your font to OpenType (.eot), and have both the .ttf and .eot files available on your server.</p>
<p>My favourite resource for conversions is the <a href="http://www.kirsle.net/wizards/ttf2eot.cgi" target="_blank">TTF to EOT Font Converter</a> but you can also use <a href="http://ttf2eot.sebastiankippe.com/" target="_blank">ttf→eot</a>. Add these sites to your bookmarks.</p>
<p>With both tools, simply upload your .ttf font file and it will return an OpenType font file to you within 30 seconds.</p>
<p>If you prefer to run things locally, you can download the TTF to EOT converter as a Windows-exectutable file via <a href="http://code.google.com/p/ttf2eot/" target="_blank">Google Code</a>.</p>
<h3>Step 3: Upload the TTF and EOT files to your server</h3>
<p>Your two font files can be uploaded via FTP.</p>
<p>If you think you may want to use a lot of custom fonts across your website, consider a dedicated &#8216;fonts&#8217; directory.</p>
<h3>Step 4: Write your CSS style sheet</h3>
<p>To incorporate the custom font, we shall use the <a href="http://www.css3.info/preview/web-fonts-with-font-face/" target="_blank">@font-face</a> attribute in CSS3. This is now a widely-supported specification across all modern browsers.</p>
<p>Our CSS file will firstly utilise the @font-face specification in the following format:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@font-face {</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'CustomFont'</span><span style="color: #00AA00;">;</span>
 src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* For Internet Explorer 6+ */</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #a1a100;">@font-face {</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'CustomFont'</span><span style="color: #00AA00;">;</span>
 src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.ttf'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* For non-IE browsers */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Notice how the @font-face is added <em>twice</em> for a single custom font? This is to ensure that the custom font is visible in Internet Explorer <em>and</em> the non-IE browers by providing a link to both the .ttf and .eot files. You cannot combine this into a single piece of code or it won&#8217;t function correctly.</p>
<p>You will need to alter the following parts of the above code to suit your purposes:</p>
<ol>
<li>Change <em>CustomFont</em> to a name that you can use to reference the font style. I suggest the actual name of the font.</li>
<li>Change <em>MyFontFile</em> to the actual name of the .ttf and .eot files. Don&#8217;t forget to change the paths to point to the location of your file on your server. (You can use relative or absolute paths at your discretion).</li>
</ol>
<p>The second part of the CSS file will contain the style attributes for your website text, as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.MyNormalFont</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Arial<span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30pt</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.MyFancyFont</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'CustomFont'</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30pt</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>In this example, I have used a common &#8216;web-safe&#8217; font called &#8220;Arial&#8221; and my custom font (called &#8220;CustomFont&#8221;).</p>
<p>I have called the CSS declarations MyNormalFont and MyFancyFont, but these names can be changed to whatever you desire. I have expanded these declarations by adding a font-size attributes, but this isn&#8217;t necessary if it is specified elsewhere in your CSS file.</p>
<h3>Step 5: Add your custom font styles to your HTML</h3>
<p>The CSS classes can be referenced in your mark-up as you would normally apply font styles in HTML. You can change the type displayed within &lt;p&gt; or &lt;div&gt; as two examples.</p>
<p>In the example is shown below, the first sentence is written in Arial and the second is written with CustomFont.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;p class=&quot;MyNormalFont&quot;&gt;This is not my Custom Font&lt;/p&gt;
&lt;p class=&quot;MyFancyFont&quot;&gt;This is my Custom Font&lt;/p&gt;</pre></div></div>

<p>Note how the mark-up references the styles in the CSS sheet? It is important that the names match.</p>
<h3>Mobile Browsers</h3>
<p>TrueType fonts are supported by iOS 4.2+ and Android 2.0+. Older mobile operating systems have varying degrees of support for TTF. If you are creating a mobile-capable site, bear this in mind.</p>
<p>That said, the use of a custom font for mobile sites will cause your website to load very slowly in mobile browsers. Therefore, it is suggested that only &#8216;web safe&#8217; fonts be used for mobile sites.</p>
<h3>Licenced fonts for @font-face</h3>
<p>As mentioned earlier, licencing is important. Two websites that offer downloadable fonts which can be used with @font-face without attracting a licence fee are <a href="http://www.fontex.org/" target="_blank">Fontex</a> and <a href="http://www.fontsquirrel.com/" target="_blank">FontSquirrel</a>.</p>
<h3>Additional Notes</h3>
<p>There are other font file formats that can be used, but these aren&#8217;t universally supported.</p>
<p>For example, the other OpenType font format .otf is supported by Google Chrome, Apple Safari and Mozilla Firefox but not Internet Explorer. The <a href="http://www.w3.org/Fonts/WOFF-FAQ.html" target="_blank">Web Open Fonts Format</a> (.woff) is also available and will possibly become a W3C standard, but is currently only supported by IE9+, Chrome and Firefox.</p>
<p>One method for providing a catch-all is to upload .eot, .woff, .ttf <i>and</i> .svg font files and refer to them all in your style sheet, as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@font-face {</span>
    <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">'CustomFont'</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.eot'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    src<span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.eot?#iefix'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'embedded-opentype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.woff'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'woff'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.ttf'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'truetype'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>
         <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'fonts/MyFontFile.svg#CustomFont'</span><span style="color: #00AA00;">&#41;</span> format<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'svg'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This will ensure that your custom font will display in the widest number of browsers and devices possible. </p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/safely-add-any-font-to-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use CSS to make a browser&#8217;s vertical scrollbar always appear</title>
		<link>http://code.adonline.id.au/make-a-browser-scrollbar-always-appear/</link>
		<comments>http://code.adonline.id.au/make-a-browser-scrollbar-always-appear/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 10:27:29 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[browser]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[scroll bar]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=290</guid>
		<description><![CDATA[Use a simple piece of CSS to force a scroll bar to appear on all pages within a website.]]></description>
			<content:encoded><![CDATA[<p>When using modern CSS-based design with fluid element widths, a website can sometimes appear to flicker if either:</p>
<ol>
<li>A browser window is altered in size by an end user.</li>
<li>Hidden content on a page becomes visible, thus lengthening the page.</li>
<li>The end user clicks from a page with little content on a website to one with more content.</li>
</ol>
<p>All of these problems arise because the browser is suddenly forced to display the vertical scroll bar where the previous state didn&#8217;t require it. The scroll bar &#8216;pushes&#8217; variable-with content (and sometimes fixed-width content, depending on the design) a small fraction to the left, creating a &#8220;flickr&#8221;.</p>
<p>There is a very simple CSS-based fix that can be applied to XHTML and HTML pages that will cause all browsers to display the vertical scroll bar whether it is required or not. That way, when the scroll bar is required, it won&#8217;t &#8216;bump&#8217; the content to the left.</p>
<p>The following code will force the scroll bar to permanently display in all modern browsers (including Internet Explorer 9.0.8, Firefox 9 and Chrome):</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">html <span style="color: #00AA00;">&#123;</span>overflow-y<span style="color: #00AA00;">:</span> <span style="color: #993333;">scroll</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Where the scroll bar is not required, it will be blank.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/make-a-browser-scrollbar-always-appear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter gets a facelift with new functionality</title>
		<link>http://code.adonline.id.au/twitter-gets-a-facelift-with-new-functionality/</link>
		<comments>http://code.adonline.id.au/twitter-gets-a-facelift-with-new-functionality/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 22:00:27 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[Twitter]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[fly]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[tweetdeck]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=284</guid>
		<description><![CDATA[Popular social media website Twitter is in the process of rolling-out a new suite of features and a brand new look.]]></description>
			<content:encoded><![CDATA[<p>Popular social media website Twitter <a href="http://blog.twitter.com/2011/12/lets-fly.html" target="_blank">has announced</a> that they are in the process of rolling out a suite of new features which will be available within the next few weeks.</p>
<p>New features will make the website easier to use and provide a platform for other features to be added onto in future. The four new tabs are &#8220;Connect&#8221; (recent activities), &#8220;Discover&#8221; (latest information and news), &#8220;Profile&#8221; (including account settings) and &#8220;Write&#8221; which is represented with a quill and inkwell symbol.</p>
<p>Twitter have launched a new website with the details at <a href="http://fly.twitter.com/" target="_blank">fly.twitter.com</a> and also released a short YouTube video that highlights the changes. There will also be more synchronisation with Twitter Mobile and <a href="http://www.tweetdeck.com/" target="_blank">TweetDeck</a> will be updated to reflect the changes.</p>
<p><a class="media {width:590, height:360, type:'swf'}" href="http://youtube.com/v/0qqDy5BmYKE?rel=0&amp;hd=1"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/twitter-gets-a-facelift-with-new-functionality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable your website to be pinned in Windows 7</title>
		<link>http://code.adonline.id.au/enable-your-website-to-be-pinned-in-windows-7/</link>
		<comments>http://code.adonline.id.au/enable-your-website-to-be-pinned-in-windows-7/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 21:52:43 +0000</pubDate>
		<dc:creator>Adam Dimech</dc:creator>
				<category><![CDATA[browser]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[pin]]></category>
		<category><![CDATA[pinned]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://code.adonline.id.au/?p=280</guid>
		<description><![CDATA[Enable your website to be 'pinned' in Windows 7.]]></description>
			<content:encoded><![CDATA[<p>Microsoft have launched <a href="http://buildmypinnedsite.com/en-au" target="_blank">BuildMyPinnedSite.com</a>, a website that provides detailed instructions about enabling a website to  be &#8216;pinned&#8217; in Windows 7.</p>
<p><img class="aligncenter size-full wp-image-281" title="MSIE9-pinned-sites" src="http://code.adonline.id.au/wp-content/uploads/MSIE9-pinned-sites.jpg" alt="" width="525" height="320" /></p>
<p>Microsoft have provided simple instructions and code snippets to enable websites to support this relatively new feature. The main tasks for web developers are creating a high-resolution icon, enabling a jump list and setting-up notifications so that website updates will appear on people&#8217;s task bars.</p>
<p>To enable these features for your website, go to <a href="http://www.buildmypinnedsite.com/" target="_blank">www.buildmypinnedsite.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.adonline.id.au/enable-your-website-to-be-pinned-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

