<?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>Web Designer - Defining the internet through beautiful design &#187; Dreamweaver</title>
	<atom:link href="http://www.webdesignermag.co.uk/category/tutorials/dreamweaver-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdesignermag.co.uk</link>
	<description>Web Design for real people</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:00:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Create interactive animations from a Twitter feed</title>
		<link>http://www.webdesignermag.co.uk/tutorials/create-interactive-animations-from-a-twitter-feed/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/create-interactive-animations-from-a-twitter-feed/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 17:10:08 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=8307</guid>
		<description><![CDATA[Twitter streams don’t have to be boring lists – there’s a world of ways to visualise what people are tweeting, so let’s get creative…]]></description>
			<content:encoded><![CDATA[<!--Mockup--><!--final--><p><img class="alignnone size-full wp-image-8319" title="Create interactive animations from a Twitter feed" src="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/Mockup.jpg" alt="Create interactive animations from a Twitter feed" width="610" height="473" />Twitter is a great tool for getting the pulse of the world, and is becoming more and more pervasive as mainstream media starts to include tweets in audience participation. The majority of users access and use Twitter through the http://twitter.com website, but thanks to the public API, we can now take the data from Twitter and do something a little different with it.<br />
This tutorial is inspired by the excellent Tori’s Eye site, found at http://toriseye.quodis.com/#webdesigner. This is a visualisation of a Twitter stream that places some stylised birds into a landscape, flying across the screen to deliver tweets. It uses the Twitter JSON API to grab tweets from the Twitter timeline and a smattering of JavaScript to present them in an engaging manner.<br />
In our version we’ll simplify how this is done, but we’ll be using the same basic principles to create an animation along similar lines to Tori’s Eye. Once you’ve completed this workshop you should have the understanding and tools at your disposal to create your own visualisation in new and exciting ways. Perhaps you’ll feel compelled to let us know what you come up with by Tweeting us (naturally) via @WebDesignerMag.</p>
<p><strong>tools | tech | trends:</strong> Adobe Illustrator, Dreamweaver, jQuery, HTML, CSS &amp; Twitter<br />
<strong>expert:</strong> Sam Hampton-Smith<br />
<strong>tutorial files: <a title="Twitter visualisations" href="http://www.webdesignermag.co.uk/tutorial-files/issue-190-tutorial-files/">download here</a></strong></p>
<p><strong>01. Design a mockup</strong><br />
We start off by taking direct inspiration from the Tori’s Eye visualisation and designing a replica inside Illustrator. Our file can be found on the disc, but to get the textures we’ve used you’ll need to visit www.sxc.hu and search for paper and rusty metal stock. Note that we’ve separated out the background and the birds onto different layers for easier export later.</p>
<p><strong>02. Output to PNG</strong><br />
Once we’re happy with the overall visual look, we need to export the graphics in a format suitable for use in the final HTML design. The background can be a straight JPEG as it doesn’t need any transparency. The birds, however, must be in PNG format. You need to isolate one bird and export it – this will become the master bird graphic.</p>
<p><strong>03. Other elements</strong><br />
In Tori’s Eye the trees are separated into a layer above the birds, so that the birds can fly behind them. We’ve chosen not to mimic this for ease of understanding, but we did separate out the trees onto their own transparent PNG layer just in case we want to replicate the layers later down the line. You can find all our graphics on this month’s CD.</p>
<p><strong>04. Create the HTML structure</strong><br />
We’ve got our graphics sorted, so now let’s create the basic HTML structure. Add the step code to a new page in your web editor. We’ll create some basic CSS rules, and to keep it simple we’ll retain all our style and script code in this one file. If you want a quick step up, we’ve included the basic HTML page on the disc – just open up ‘start.html’.</p>
<p><em> &lt;html&gt;</em><br />
<em>&lt;head&gt;</em><br />
<em>&lt;title&gt;Twitter Animation&lt;/title&gt;</em><br />
<em>&lt;style&gt;</em><br />
<em>&lt;/style&gt;</em><br />
<em>&lt;/head&gt;</em><br />
<em>&lt;body&gt;</em><br />
<em>&lt;div id=&#8221;container&#8221;&gt;</em><br />
<em>&lt;div id=&#8221;trees&#8221;&gt;</em><br />
<em>&lt;div id=&#8221;tweetscontainer&#8221;&gt;</em><br />
<em>&lt;/div&gt;</em><br />
<em>&lt;/div&gt;</em><br />
<em>&lt;/div&gt;</em><br />
<em>&lt;/body&gt;</em><br />
<em>&lt;/html&gt;</em></p>
<p><strong> 05.  Add some CSS</strong><br />
Apply this CSS; the full code is on the disc.</p>
<p><em> body {</em><br />
<em> font-family:    arial, helv, sans- serif;</em><br />
<em>font-size:    66%;</em><br />
<em>background:    #f9f9f9;</em><br />
<em>padding:    20px;</em><br />
<em>}</em><br />
<em>#container {</em><br />
<em>position:    relative;</em><br />
<em>width:            1024px;</em><br />
<em>height:        700px;</em><br />
<em>margin:        auto;</em><br />
<em>background:  transparent url(styles/background.jpg) no-repeat top left;</em></p>
<p><strong>06. Grab jQuery</strong><br />
Visit http://jquery.com and download the latest version of the library. jQuery makes it easy for us to interact with different elements on the page and create animations. To this end, we’ll install it at the top of our page, and set up a function beneath ready to hold all of the code to make our visualisation work.</p>
<p><em>&lt;script type=&#8221;text/javascript&#8221;  src=&#8221;scripts/jquery.js&#8221;&gt;&lt;/script&gt;</em><br />
<em>&lt;script type=&#8221;text/javascript&#8221;&gt;</em><br />
<em>$(document).ready(function(){</em><br />
<em>// Your jQuery code will slot in     here</em><br />
<em> });</em><br />
<em>&lt;/script&gt;</em></p>
<p><strong>07. Connect to Twitter</strong><br />
Twitter has an API that’s publicly accessible. If you’re creating a full application, you may want to sign up for a specific developer API key, but for our purposes we’re just going to use the public version. We can call this using jQuery’s JSON method. Note that we’re passing in a search term that will return matching tweets – change this to suit you. Full code is on the CD.</p>
<p><em>var url = &#8220;http://search.twitter.com/ search.json?q=iphone&amp;rpp=15&amp;callback=?&#8221;;</em><br />
<em>var tweets = $(&#8216;&lt;ul id=&#8221;tweets&#8221;&gt;&#8217;).         appendTo(&#8220;#tweetscontainer&#8221;);</em><br />
<em>$.getJSON(url,  function(data){</em><br />
<em>// Do something with the data returned</em></p>
<p><strong>08. Parsing JSON</strong><br />
The data is returned from Twitter as a JSON object. JSON is a straightforward way to wrap data as a set of keys and values in an array. All we need to do is to iterate through the returned array and generate HTML. code from the values for each set of data. Add the code below to do this; full code is on the cover disc.</p>
<p>$.getJSON(url,  function(data){<br />
$.each(data.results, function(i,item){<br />
tweets.append(&#8216;&lt;li&gt;&lt;div&gt;&lt;img src=&#8221;&#8216;  + item.profile_image_url +&#8217;&#8221; alt=&#8221;&#8216; +<br />
item.from_user + &#8216;&#8221; width=&#8221;73&#8243;           height=&#8221;73&#8243; /&gt;&lt;p&gt;&lt;a href=&#8221;http://twitter.       com/&#8217;+item.from_user<br />
+&#8217;/statuses/&#8217;+item.id+&#8217;&#8221; title=&#8221;Click    here to view this on twitter&#8221;&gt;&#8217;+item.from_      user+&#8217;&lt;/a&gt; at<br />
&#8216;+item.created_at+&#8217;: &#8216;+item.text.           replace(/(\w+:\/\/[A-Za-z0-9-_]+\.              [A-Za-z0-9-_:%&amp;\?\/.=]+)/gi, &#8216;&lt;a<br />
href=&#8221;$1&#8243;&gt;$1&lt;/a&gt;&#8217;).replace(/             [\@]+([A-Za-z0-9-_]+)/gi, &#8216;&lt;a href=&#8221;http://     twitter.com/$1&#8243;&gt;@$1&lt;/</p>
<p><strong>09. Output results</strong><br />
Our code generates a list item (&lt;li&gt;) for each tweet, wrapping the actual contents of the tweet inside a &lt;div&gt; tag. We’ll use this later on to show and hide the tweet, but for now you should have 15 list items once the code has finished doing its work.</p>
<p><strong>10. Test it out</strong><br />
It’s worth taking a moment to make sure your script is loading the tweets and outputting them in HTML. Although this will look pretty ugly, it’s a quick way to verify everything is working as it should. Once you’ve loaded it in your browser and observed all your tweets loading, you can move on to the next step.</p>
<p><strong>11. More style</strong><br />
Let’s deal with the ugliness first of all. Each list item will become a bird that we animate across the screen. We’ve already set our container to have overflow:hidden, so we’ll be able to position our birds so that they start off outside the visible area, then animate them into position. Add the CSS below to set the start position for each &lt;li&gt;. Full code is on the disc.</p>
<p><em>#tweets {</em><br />
<em>position:    absolute;</em><br />
<em>top: 0;</em><br />
<em>left:  0;</em><br />
<em>width:  2000px;</em><br />
<em>margin-left:  -300px;</em></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><strong>12. Create speed variables for the birdies</strong><br />
We’re going to generate a speed variable for each list item and run a function periodically to set the position of the bird. Each time the function runs, we’ll use the speed variable to reposition the list item by a set amount, and as we repeatedly run our function, so the list items will appear to be animated across the page.</p>
<p><strong>13. Generate random values</strong><br />
We’re going to use random numbers to set the speed of each bird so that the birds don’t all fly across the screen at the same rate. JavaScript lets us generate random numbers using the Math.random() function. Add the code below to call up a random number between 0 and 9 to represent the speed of each bird.</p>
<p><em>var speed=Math.floor(Math.random()*10)+1;     </em></p>
<p><strong>14. Set the start position</strong><br />
We don’t, however, want them all to be at the same vertical level, otherwise it’ll become very monotonous – so to avoid this we need to set a random starting position. We also need to store the speed value for each bird, and we can do this using the .data() method in jQuery. Add the code below to set the vertical position and store the speed. We also set the horizontal position to offset a little for each &lt;li&gt;.</p>
<p><em>var offsettop=Math.floor(Math. random()*400)+10;</em><br />
<em>$(&#8220;#tweets li:last&#8221;).data(&#8220;speed&#8221;,speed).css({top:offsettop,right:2000+(i*30)});</em></p>
<p><strong>15. Get things moving</strong><br />
Although jQuery has the animate() method, we’ll use a straight setInterval function and set the position of each bird using CSS alone. This will enable us to control the frame rate more easily and give more predictable results. To start we’ll need a function that fires periodically; add the code below to create this.</p>
<p><em>var t = setInterval(function(){</em><br />
<em>// we’ll set the position of each bird every 30 milliseconds</em><br />
<em>},30);</em></p>
<p><strong>16. Get things moving 2</strong><br />
Each time the function fires, we want to update the position of every bird to its new location on screen. Add this step’s code to grab the speed for each bird from the data() object and update the position of the bird accordingly. Again, full code is on the CD.</p>
<p><em>var t = setInterval(function(){</em><br />
<em>$(&#8220;#tweets li&#8221;).each(function(){</em><br />
<em>// grab the speed variable</em><br />
<em>speed = $(this).data(&#8220;speed&#8221;);</em><br />
<em>// and the current position</em><br />
<em>xpos = $(this).css(&#8220;left&#8221;);</em><br />
<em>// if the bird is off the left hand side of the screen, reset it to the right</em></p>
<p><strong>17. Time to test</strong><br />
It’s time to open your page and test it out. All being well, after a short delay while the Twitter feed loads, you should see birds flying across the screen with tweets sitting on top of them. We’re nearly there now – just a bit of tidying up to do!</p>
<p><strong>18. Pause for thought</strong><br />
The first thing that we notice is that it’s a little tricky to read the tweets as they zoom past. Let’s make the bird stop in position when the cursor is hovered over it. We’ll want the bird to carry on moving when we mouse off the bird, so add a clause to the animation function, and add a class to the bird as we mouse over to exclude it from the animation.</p>
<p><em>$(&#8220;#tweets li&#8221;).not(&#8220;.hover&#8221;).each(functio…</em><br />
<em>$(&#8220;#tweets li&#8221;).hover(function(){</em><br />
<em>$(this).addClass(&#8220;hover&#8221;);</em><br />
<em>$(this).css({zIndex:1000});</em><br />
<em>},function(){</em><br />
<em>$(this).removeClass(&#8220;hover&#8221;);</em><br />
<em>});</em></p>
<p><strong>19. More style</strong><br />
Now we’ve got our birds flying across the screen, it would be nice to have the actual tweets appearing only when each bird is moused over. We’ll apply a little more panache to the way the tweets are displayed at the same time. Add the CSS below to hide the tweets until mouseover, and get them looking a bit more presentable. You will find the full code for this step on the cover disc.</p>
<p><em>#tweets li div {</em><br />
<em>display:  none;</em><br />
<em>padding:             10px;</em><br />
<em>background:    rgba(0,0,0,0.7);</em><br />
<em>color:                 #fff;</em><br />
<em>min-height:    93px;</em><br />
<em>margin-top:    100px;</em></p>
<p><strong>20. Another quick test</strong><br />
If you test again now you should see the birds without all the tweets sitting on top of them, and as you move your mouse over the top of a bird it should stop in its tracks, and the tweet should then display underneath it. With these changes, we think the page is looking much slicker, plus it makes the Twitter stream much more fun to interact with!</p>
<p><strong>21. Tweak to suit</strong><br />
When you test out your page you’ll almost certainly find that you want to modify some of the values – especially the random number generation and setInterval delay, as this will affect how quickly the birds fly across the screen. Try experimenting with a few different values to see the effect they have, and tweak values to taste.</p>
<p><strong>22. Take it to the next level</strong><br />
Your overall visualisation should now be working nicely. Test in all your target browsers and check that everything works as it should. You might now want to consider extending the functionality so that the user can input their own search term, or so that some birds are bigger/faster than others – get creative and show us what you produce. You might end up in the Lightbox!</p>
<p><img class="alignnone size-full wp-image-8318" title="Create interactive animations from a Twitter feed" src="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/final.jpg" alt="Create interactive animations from a Twitter feed" width="610" height="397" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/create-interactive-animations-from-a-twitter-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take control of your backgrounds with CSS3</title>
		<link>http://www.webdesignermag.co.uk/blog/backgrounds-with-css3/</link>
		<comments>http://www.webdesignermag.co.uk/blog/backgrounds-with-css3/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 17:02:16 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[backgrounds]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[walkthrough]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=8308</guid>
		<description><![CDATA[
CSS3 offers designers more flexibility with background images. Here we take a look at some of the key properties]]></description>
			<content:encoded><![CDATA[<!--Final--><!--size01--><!--size02--><p><a href="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/Final.jpg"><img class="alignnone size-full wp-image-8309" title="Take control of your backgrounds with CSS3" src="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/Final.jpg" alt="Take control of your backgrounds with CSS3" width="500" height="294" /></a></p>
<p><strong>Take control of your backgrounds with CSS3</strong></p>
<p>CSS3 offers designers more flexibility with background images. Here we take a look at some of the key properties</p>
<p>Background images have played a key role in web design for as long as CSS has been popular, and support has been available. They are the aesthetic that creates the persona of a page. The big issue with background images is their lack of flexibility. They can repeat – perfect for textures, and they can be fixed to stay in place on screen but they cannot be resized. This means that developers who want a beautiful full-screen canvas, or simply more flexibility, have to improvise with absolute positioned tags, image sizes or code.<br />
The background-size property, part of the CSS3 Backgrounds and Borders module, grants designers far more scope to be creative and with cleaner code. And, with support for multiple backgrounds by its side, this tasty duo is set to finally give web designers a chance to make the most of their backdrops.</p>
<p>This article was originally featured in Web Designer issue 190, authored by Steve Jenkins. There are no project files required for this tutorial.</p>
<p><strong>01 Default value</strong></p>
<p><a href="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/size01.jpg"><img class="alignnone size-full wp-image-8310" title="Take control of your backgrounds with CSS3" src="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/size01.jpg" alt="Take control of your backgrounds with CSS3" width="500" height="322" /></a></p>
<p>The default value for the background-size property is auto. This displays the background image at its original size, eg 1,000 x 700px. The background-size property works in tandem with the background property so if the image is set to no-repeat only one instance will appear; on the other hand, if set to repeat it will do just that.</p>
<p><strong>02 Specific size</strong></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><a href="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/size02.jpg"><img class="alignnone size-full wp-image-8313" title="Take control of your backgrounds with CSS3" src="http://www.webdesignermag.co.uk/wp-content/uploads/2012/02/size02.jpg" alt="Take control of your backgrounds with CSS3" width="500" height="305" /></a></p>
<p>An alternative to the auto option is a specific set of dimensions, eg 500 x 350px. The first value refers to the width of the image while the second refers to the height. Again, the repeat property helps to determine how the background appears.</p>
<p><strong>03 Auto values</strong><br />
Background-size allows for the combination of specific sizes and the auto option. If the first value (width) is set to 500px and the second value to auto, the height will be automatically reduced proportionately to the width. This keeps the image’s original aspect ratio. If only the first value is added it is assumed that the second is auto.</p>
<p>001 <em>#topsection{</em><br />
002 <em>background: url(images/image.jpg) no-repeat</em><br />
003 <em>background-size: 500px auto;</em><br />
004 <em>}</em></p>
<p><strong>04 Auto width</strong><br />
Adding the auto value first changes the perspective of an image. The first value (width) will now be determined by the second value (the height). The height will become the static value and the height will be automatically reduced/increased proportionately to the width, again keeping the aspect ratio.</p>
<p>001 <em>#topsection{</em><br />
002 <em>background: url(images/image.jpg) no-repeat</em><br />
003 <em>background-size: auto 500px; </em><br />
004 <em>}</em></p>
<p>05 Percentages<br />
To add more flexibility to the size of a background image the values can be added as percentages. Adding a percentage as the first value, eg 50%, determines that the width will be 50% of the screen or 50% of the containing div tag. The second value (height) will be set to auto and its size will be kept in proportion.</p>
<p>001 <em>#topsection{</em><br />
002 <em>background: url(images/image.jpg) no-repeat</em><br />
003 <em>background-size: auto 500px;}</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/blog/backgrounds-with-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build mobile apps with Sencha Touch</title>
		<link>http://www.webdesignermag.co.uk/tutorials/build-mobile-apps-with-sencha-touch/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/build-mobile-apps-with-sencha-touch/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 17:17:09 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Dreamweaver CS5]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iOS Simulator]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=7788</guid>
		<description><![CDATA[An introduction to creating web apps for Android and iPhone with Sencha Touch, a new standards-based framework]]></description>
			<content:encoded><![CDATA[<!--senchatouch01--><!--senchatouch02--><p><img class="size-full wp-image-7793 alignleft" title="Build mobile apps with Sencha Touch" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/11/senchatouch01.jpg" alt="Build mobile apps with Sencha Touch" width="290" height="500" /></p>
<p><img class="alignnone size-full wp-image-7794" title="Build mobile apps with Sencha Touch" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/11/senchatouch02.jpg" alt="Build mobile apps with Sencha Touch" width="293" height="480" /></p>
<p>Mobile frameworks highlight the ability to create native app-like experiences through standards- based web technologies such as HTML5, CSS3 and JavaScript. This tutorial concentrates on Sencha Touch, which is an open-source framework for creating mobile apps built using ‘Ext.js’ JavaScript.</p>
<p>Sencha Touch uses a HTML document that links to JavaScript and CSS, while the HTML contains an empty body tag with no content. Using JavaScript, the content is built on the page for the user so that the content can be built specifically for the screen size of the device. The good news is that you get some very polished results that scale to fit the browser of any device, which is key when designing for a variety of different devices. The downside of this is that Sencha Touch is a little harder than jQuery Mobile and you will probably spend far more time learning the framework, but the results are excellent for a very native app experience.</p>
<p><strong>tools | tech | trends</strong>: Dreamweaver CS5, Sencha Touch, iOS Simulator<br />
<strong>expert:</strong> Mark Shufflebottom<br />
<strong>tutorial files: </strong><a href="http://www.webdesignermag.co.uk/tutorial-files/issue-183-tutorial-files/" target="_self">download here</a></p>
<p><strong>01. Get the project started</strong><br />
From the cover CD, drag the ‘start’ folder onto your desktop. It’s a good idea to point your browser towards the Sencha Touch www.sencha.com/products/touch site and download the framework. In the start folder create a new HTML page, ‘index.html’, in Dreamweaver and add the code to the head section.</p>
<p><em>001 &lt;link rel=”stylesheet” href=”resources/css/sencha-touch.css” type=”text/css”&gt;<br />
002 &lt;link rel=”stylesheet” href=”bolt.css” type=”text/css”&gt;<br />
003 &lt;script type=”text/javascript” src=”http://maps.google.com/maps/api/js?sensor=true”&gt;&lt;/script&gt;<br />
004 &lt;script type=”text/javascript” src=”sencha-touch.js”&gt;&lt;/script&gt;<br />
005 &lt;script type=”text/javascript” src=”bolt.js”&gt;&lt;/script&gt;</em></p>
<p><strong>02. Start the app</strong><br />
The previous code links up to the Sencha touch CSS, our own CSS ‘bolt.css’, the Google Maps api and the Sencha Touch JavaScript. We’re going to create our own App JavaScript, so create a new JavaScript file and name it ‘bolt.js’. Now add the code shown which associates start up screens and icons to the app if saved to the home screen in iOS.</p>
<p><em>001 Ext.setup({<br />
002     tabletStartupScreen: ‘tablet_startup.png’,<br />
003     phoneStartupScreen: ‘phone_startup.png’,<br />
004     icon: ‘icon.png’,<br />
005     glossOnIcon: false,<br />
006     onReady: function() {<br />
007     }<br />
008 });</em></p>
<p><strong>03. Basic structure</strong><br />
Inside the onReady function add the code shown. This sets up four pages, which are the four variables, home, work, blog and map. This is how Sencha creates pages. Some of these pages will change in their functionality as we go through the tutorial but this is useful in helping us to get the basics in place.</p>
<p><em>001 var home = {<br />
002     title:’Home’, scroll: ‘vertical’, html: ‘home’<br />
003 }<br />
004 var work = {<br />
005     title:’Work’, scroll: ‘vertical’, html: ‘work’<br />
006 }<br />
007 var blog = {<br />
008    title:’Blog’, scroll: ‘vertical’, html: ‘blog’<br />
009 }<br />
010 var map = {<br />
011 title:’Map’, scroll:vertical’, html: ‘map’<br />
012 }</em></p>
<p><strong>04. Create the menu</strong><br />
Add the next code under the last variable from the previous step. This creates a tab menu bar for us, and creates the transition between the ‘cards’ (pages). Notice the items added are the four variables from the previous steps. Save all pages now and test ‘index.html’ in the browser.</p>
<p><em>001 var myPanel = new Ext.TabPanel({<br />
002     fullscreen:true,<br />
003     cardSwitchAnimation: {type:<br />
004     ‘slide’, duration: 500},<br />
005     ui: ‘light’,<br />
006     layout: ‘card’,<br />
007     items: [home, work, blog, map],<br />
008 });</em></p>
<p><strong>05. Create the homepage</strong><br />
You might have noticed the ui being set as ‘light’, just try changing this to ‘dark’ and check your browser again. It’s always worth exploring the built-in user interfaces. Now go back to the home section and replace the html with the code shown. Notice the last line, ‘cls’ – this sets the<br />
pages’ class, and you can check this out in ‘bolt.css’.</p>
<p>001  html: ‘&lt;img src=”img/ logo.png” width=”280” height=”133” alt=”logo” class=”mainImg” /&gt;<br />
002 &lt;span class=”rounded”&gt;&lt;h2 class=”welcome”&gt;Welcome to Bolt&lt;/h2&gt;<br />
003 &lt;p&gt;We produce beautiful design and illustrations. Explore our work to find out how we can enhance your digital experience.&lt;/p&gt;<br />
004 &lt;/span&gt;’,<br />
005 cls:’home’</p>
<p><strong>06. Change the work section</strong><br />
We’re going to completely replace the work section now with a Carousel component, so copy in the new code shown. The Carousel is a swipe-enabled system to swipe left or right to flick between pages, just perfect for showing off your work. Save the files and then test it out in your browser.</p>
<p><em>001  var work = new Ext.Carousel({<br />
002     title: ‘Work’, scroll: ‘vertical’,<br />
cls:’home’,<br />
003     items:[<br />
004 {title: ’Work1’, html:‘Work1’},<br />
005 {title:’Work2’, html: ‘Work2’},<br />
006 {title:’Work3’, html: ‘Work3’}<br />
007     ]<br />
008 });</em></p>
<p><strong>07. Real content to the work</strong><br />
We’ll add real content to the work sections, so that we can see the content being swiped. Change the html of ‘Work1’, as shown. This will place in an<br />
image and some text below that. Notice the class names here – they are again found in the ‘bolt.css’ file, which is worth keeping open to compare the classes with the final result.</p>
<p><em>001  html: ‘&lt;img src=”img/3d.png” width=”260” height=”210” alt=”logo” class=”mainImg” /&gt;<br />
002 &lt;h2 class=”work”&gt;Illustrations&lt;/h2&gt;<br />
003 &lt;p class=”alt”&gt;3D Illustration and visualisation. &lt;br&gt;&lt;small&gt;Swipe left to explore more.&lt;/small&gt;&lt;/p&gt;’ </em></p>
<p><strong>08. Further develop the carousel</strong><br />
The carousel looks much better, however there is only one section complete and the others still look empty. Replace the ‘Work2’ html with the following code that will add some content to the second panel. The main difference here is the image, and the text reflects that with the description.</p>
<p>001  html: ‘&lt;img src=”img/web.png” width=”260” height=”210” alt=”logo” class=”mainImg” /&gt;<br />
002 &lt;h2 class=”work”&gt;Web Design&lt;/h2&gt;<br />
003 &lt;p class=”alt”&gt;Bespoke Web CMS and Site Design  &lt;br&gt;&lt;small&gt;Swipe to explore more. &lt;/small&gt;&lt;/p&gt;’</p>
<p><strong>09. Last carousel panel</strong><br />
Now we’ll add the final code for the ‘Work3’ panel in the carousel. Replace the html section with the code shown here. Once added, save your work and view the file in your browser. You should be able to swipe left and right now, to see different panels sliding in and out much more clearly with the content.</p>
<p>001 html: ‘&lt;img src=”img/mob.png” width=”260” height=”210” alt=”logo” class=”mainImg” /&gt;<br />
002 &lt;h2 class=”work”&gt;Mobile Experiences&lt;/h2&gt;<br />
003 &lt;p class=”alt”&gt;Mobile App and site design  &lt;br&gt;&lt;small&gt;Swipe right to explore more. &lt;/small&gt;&lt;/p&gt;’</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><strong>10. Start the blog</strong><br />
We’re going to start the process of importing data from a blog, and we’ll do this through RSS and the YQL method. Move to the very top of the JavaScript document and add the following code. This sets up a new object that we’ll call later to draw in the data, this will be an object that can call any RSS source.</p>
<p><em>001  Ext.YQL = {<br />
002     useAllPublicTables: true,<br />
003     yqlUrl: ‘http://query.yahooapis.com/v1/<br />
public/yql’,<br />
004     request: function(cfg) {<br />
005         var p = cfg.params || {};<br />
006         p.q = cfg.query;<br />
007         p.format = ‘json’;</em></p>
<p><strong>11. Call with JSONP</strong><br />
The YQL request uses JSONP to get the data from the URL that will be passed in when called. Once the data has been received from this URL, the ‘callback’ function will be called. This function will parse the data and pass it into a template for the blog for each entry.</p>
<p><em>001  if (this.useAllPublicTables) {<br />
002     p.env = ‘store://datatables.org/alltableswithkeys’;<br />
003 }<br />
004 Ext.util.JSONP.request({<br />
005     url: this.yqlUrl,<br />
006     callbackKey: ‘callback’,</em></p>
<p><strong>12. Send back to function</strong><br />
Once the content has been pulled out of the YQL statement using JSONP, the content is sent back to the function that has called the query. We will set up the function that passes the URL for the feed in the next step. The closing brackets just finish off this section of the code as a separate function.</p>
<p><em>001 params: p,<br />
002 callback: cfg.callback,<br />
003 scope: cfg.scope || window<br />
004 });<br />
005 }<br />
006 };</em></p>
<p><strong>13. Call the RSS feed</strong><br />
Scroll down to the ‘var myPanel’ code. After the closing brackets, ‘});’ start adding the code shown. This is the variable that sets up the function to make the  YQL request, as indicated by the name of the function. Here the query is passed to the Ext.YQL.request we set up in step 10. Feel free to change the URL to your own RSS feed.<br />
<em><br />
001 var makeYqlRequest = function() {<br />
002 Ext.YQL.request({<br />
003 query: “select * from rss where url=’http://www.webspaceinvader.com/feed/’ limit 5”,</em></p>
<p><strong>14. Answer the call</strong><br />
The callback function is added next, straight after the previous code. The code we added in step 11 and 12, call this code. A variable is set up called results, which is an array. We use the if statement to check the query has been handled and if there are some results, we store them in the results array.</p>
<p><em>001 callback: function(response) {<br />
002 var results = [];<br />
003 if (response.query &amp;&amp; response.query.results) {<br />
004 results = response.query.results;<br />
005 }</em></p>
<p><strong>15. Pass it on</strong><br />
Add in the code, following the last steps code. Once we have the results stored in the results array, we call the blog variable and update it by passing over the results array. The closing brackets close off the function and then the function is called by using makeYqlRequest().</p>
<p><em>001 blog.update(results);<br />
002 }<br />
003 });<br />
004 };<br />
005 makeYqlRequest();</em></p>
<p><strong>16. Update the blog</strong><br />
Find the ‘var blog’ code we added in step 3 and completely replace it with the code shown below. Notice the blog is now a component? This will enable us to create a template for each of the blog posts from the RSS. The ‘&lt;tpl’ denotes a template and it creates a new heading for each of the posts.<br />
<em><br />
001  var blog = new Ext.Component({<br />
002     title:’Blog’,scroll:‘vertical’, cls:’home’, tpl:[<br />
003     ‘&lt;tpl if=”item”&gt;’,<br />
004     ‘&lt;tpl for=”item”&gt;’,<br />
005      ‘&lt;h2 class=”blog”&gt;&lt;a href=”{link}” target=”_blank”&gt;{title}&lt;/a&gt;</em></p>
<p><strong>17. Close the blog section</strong><br />
Add the following code directly under the last. This adds the author of the post in smaller text next to the post title. Under this, the description is dropped in. Again, this is repeated for each of the posts. The closing template tags complete this section. Save this file and preview in the browser after you refresh the view.<br />
<em><br />
001 &lt;small&gt; by {creator}&lt;/small&gt;&lt;/h2&gt;’,<br />
002 ‘&lt;p class=”alt”&gt;{description}&lt;/p&gt;’,<br />
003 ‘&lt;/tpl&gt;’,<br />
004 ‘&lt;/tpl&gt;’<br />
005 ]<br />
006 });</em></p>
<p><strong>18. Add a geo position </strong><br />
If you’ve got a good memory, you’ll remember adding a JavaScript link file for Google Maps in step 1. Directly underneath the last code and before the map variable, add the following map variable, which adds a geo position to a new variable that we will add to the map when we display it on the map screen.</p>
<p><em>001 var position = new google.maps.LatLng (50.743213, -1.896901);</em></p>
<p><strong>19. Replace the original map</strong><br />
Remove the entire map variable, as we are going to change it now to reflect a real map – what we had before was just a placeholder. As you can see from the code shown here, we set up a new map object and give it a title. An important property here is to not use the current location, however you might need this for your own apps.</p>
<p><em>001  var map = new Ext.Map({<br />
002 title: ‘Map’,<br />
003 useCurrentLocation: false,</em></p>
<p><strong>20. Always have options</strong><br />
Continue adding the code to finish off the map section. This code centers the map on the position variable and sets the zoom factor of the map. Save your file now and refresh your view in the browser. You will now be able to click the map button, and it will display a map of our example location Bournemouth, UK.</p>
<p><em>001 mapOptions: {<br />
002     center : position,<br />
003     zoom: 12<br />
004 }<br />
005 });</em></p>
<p><strong>21. Add a map marker</strong><br />
Under the ‘myPanel’ section, add the code shown. This sets up a new variable to hold the information for a marker. The position of this marker<br />
is set to the position variable defined in step 18. We also have to tell the marker what to be added to – in this case, it’s the map found in the map variable. Yes, it’s confusing!</p>
<p><em>001 var marker = new google.maps.Marker({<br />
002     position: position,<br />
003     map: map.map<br />
004 });</em></p>
<p><strong>22. Add an info bubble</strong><br />
Add the final section of the code that adds a unique bubble when the map marker is pressed. The event listener adds the bubble to the marker. Finally, save the file and test it out in your browser. This should conclude your first introduction to Sencha Touch – you can view the Kitchen Sink demo to go even further and expand the complexity of the project.</p>
<p><em>001     var infowindow = new google.maps.InfoWindow({<br />
002 content: ‘&lt;img src=”img/bolt.png” width=”50”<br />
003 height=”44” alt=”logo” align=”left” /&gt;Bolt<br />
004 Design&lt;br&gt;Tel: 01202 123456’<br />
005 })<br />
006 google.maps.event.addListener(marker,<br />
‘click’, function() {<br />
007         infowindow.open(map, marker);<br />
008 });</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/build-mobile-apps-with-sencha-touch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add a Facebook image gallery to your site</title>
		<link>http://www.webdesignermag.co.uk/tutorials/facebook-image-gallery/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/facebook-image-gallery/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 10:58:50 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=7208</guid>
		<description><![CDATA[Deliver a dynamic photo gallery with  this social network-powered solution]]></description>
			<content:encoded><![CDATA[<!--facebook--><!--step1--><!--step1_2--><!--step3--><p><img class="alignnone size-full wp-image-7220" title="Add a Facebook image gallery to your site" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/09/facebook.jpg" alt="Add a Facebook image gallery to your site" width="500" height="188" /></p>
<p>tools | tech | trends: Dreamweaver, PHP, Lightbox<br />
expert: Pete Simmons</p>
<p>(This article originally appeared in Web Designer issue 183, authored by Pete Simmons (aka &#8216;Terrorfall&#8217;). You can download the associated CD project files by <a href="http://www.webdesignermag.co.uk/wp-content/uploads/2011/04/Facebook_Gallery.zip" target="_blank">clicking here</a>)</p>
<p>Following on from the Facebook news feed tutorial found in issue 181, we’ll be showing you how to use Facebook to drive a dynamic photo gallery. The gallery will update as you add photos through Facebook, and will display image comments.<br />
If you missed the previous tutorial, we’ll start from the beginning, showing you how to get your Facebook ID and get the page set up correctly. As before, you won’t need to authenticate a website visitor, as all data retrieved is publicly accessible. However, it is worth noting that you may need to authenticate if you are pulling data from a personal page, rather than a fan page.<br />
This tutorial assumes that you have a PHP environment set up that is capable of reading JSON objects. JSON functionality comes pre-packaged  with PHP version 5.2.0 and higher, but if you find that you are getting “Fatal error: Call to undefined function json_decode()”, see the following forum post: <a href="http://bit.ly/noJSON" target="_blank">http://bit.ly/noJSON</a>. It may also be worth switching hosting provider, or downloading and installing the latest version of XAMPP from <a href="http://bit.ly/getXAMPP" target="_blank">http://bit.ly/getXAMPP</a>.<br />
This tutorial will not cover adding CSS or any images, but the project contain a basic template.<br />
<strong><br />
01 Facebook page setup</strong></p>
<p><img class="alignnone size-full wp-image-7212" title="Add a Facebook image gallery to your site" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/09/step1.jpg" alt="Add a Facebook image gallery to your site" width="500" height="190" /></p>
<p>It is important to ensure your Facebook page is set up correctly, so that your website can view the data. Go to your page on Facebook, select Edit Page and ensure that there are no age or country restrictions listed under the Manage Permissions tab. Also, ensure the ‘Only admins can see this Page’ box is unchecked.</p>
<p><img class="alignnone size-full wp-image-7211" title="Add a Facebook image gallery to your site" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/09/step1_2.jpg" alt="Add a Facebook image gallery to your site" width="500" height="237" /></p>
<p><strong>02 Your page ID</strong><br />
If you’ve set up a brand new Facebook page, you won’t be able to shorten the URL yet and you will need to use the ID of your page. The easiest way to get hold of this is to click on your page’s profile picture and make a note of the numbers listed after “&amp;id=” in your address bar.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><strong>03 View page data</strong></p>
<p><img class="alignnone size-full wp-image-7213" title="Add a Facebook image gallery to your site" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/09/step3.jpg" alt="Add a Facebook image gallery to your site" width="500" height="239" /></p>
<p>Go to <a href="https://graph.facebook.com/terrorfall/albums" target="_blank">https://graph.facebook.com/terrorfall/albums</a> and you’ll see a JSON-encoded list of all photo albums on the terrorfall Facebook page. These are arranged from newest to oldest by default and show links to individual albums, as well as album comments. Replace “terrorfall” with your own page name or page ID to see your own.</p>
<p><strong>04 Page character setup</strong><br />
Open the template file or create a new PHP document in Dreamweaver. This is required to prevent character errors as we progress through the tutorial. By default Dreamweaver will add this in, but ensure you have the following line of code in the head section of your PHP page.</p>
<p>001 <em>&lt;meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8”/&gt;</em></p>
<p><strong>05 Import Facebook data</strong><br />
Drop down to the body section of your PHP document and open up a new section of PHP code.<br />
The following lines of code set out the page that you want to get the data from. Add this in, along with some tidy comments, replacing ‘terrorfall’ with your page name or ID.</p>
<p>001 <em>&lt;?php</em><br />
002 <em>//Set the page name or ID</em><br />
003 <em>$FBid = ‘terrorfall’;</em><br />
004 <em>//Get the contents of a Facebook page</em><br />
005 <em>$FBpage = file_get_contents(‘https://graph.facebook.com/’.$FBid.’/albums’);</em><br />
006 <em>//Interpret data with JSON </em><br />
007 <em>$photoData= json_decode($FBpage);</em><br />
008 <em>?&gt; </em> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/facebook-image-gallery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Cross-browser fonts and CSS styling rules</title>
		<link>http://www.webdesignermag.co.uk/tutorials/cross-browser-fonts-and-css-styling-rules/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/cross-browser-fonts-and-css-styling-rules/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 10:58:20 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Cross-browser]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Dreamweaver CS5]]></category>
		<category><![CDATA[Enrique Ramírez]]></category>
		<category><![CDATA[Espresso]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=7206</guid>
		<description><![CDATA[Add beautiful, rich and cross-browser compatible typography for your page designs using @font-face and CSS]]></description>
			<content:encoded><![CDATA[<!--WD184_054-056Fonts--><p><img class="alignnone size-full wp-image-7219" title="Cross-browser fonts and CSS styling rules" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/09/WD184_054-056Fonts.jpg" alt="Cross-browser fonts and CSS styling rules" width="550" height="458" /></p>
<p>Ever since the web started, designers have desired to bring the beauty of their favourite fonts into their designs. Unfortunately, we’ve been limited and just been able to use a handful of ‘web-safe’ fonts (fonts that most computers will have installed) for the dynamic text in our designs, leaving using images or flash movies of non web-safe fonts (our precious, expensive and beautiful bought fonts) as our only resource for bringing them alive on the web.<br />
Our desire was so strong that tools were created to bring these fonts into our tool belt – sIFR, Cufón, Flir and a few more – all with pros and cons, but none was really giving us the flexibility we needed. Today, with the strength and support CSS3 is getting, especially from browser developers, we can now make use of one of its greatest features: @font-face. This nifty tool gives us the power to embed any font we want into a website as native text (rather than an image or an object). Of course, it comes with a few limitations, but nothing that can’t be easily learnt and mastered in order to get all major browsers to display it exactly the way you want it.</p>
<p><strong>tools | tech | trends</strong>: HTML5, CSS3, Dreamweaver CS5 / Espresso<strong><br />
expert:</strong> Enrique Ramírez<br />
<strong>tutorial files &amp; code:</strong> <a href="http://www.webdesignermag.co.uk/tutorial-files/issue-184-tutorial-files/" target="_self">Download here</a></p>
<p><strong>01. The markup</strong><br />
On your text editor, create a new file. Add an HTML5 doctype, an empty &lt;style&gt; tag in the header and a few paragraphs on the body, each with an h1 to h6 header. Add a blockquote for good measure. You’ll be adding different styles to each of these elements,<br />
so keep them well separated for better comparison.</p>
<p><em>&lt;!DOCTYPE html&gt;<br />
&lt;html lang=”en”&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Web Fonts Styling&lt;/title&gt;<br />
&lt;meta charset=”utf-8” /&gt;<br />
&lt;meta http-equiv=”X-UA-Compatible”     content=”IE=edge,chrome=1” /&gt;<br />
&lt;style type=”text/css”&gt;<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;Quick Brown Fox jumps over&#8230;&lt;/h1&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet,         consectetur adipiscing elit. &lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</em></p>
<p><strong>02. The basic styling</strong><br />
Go to your &lt;style&gt; tag in the header, and give the basic page a prettier look. Add a background and font colour. Give some basic styling to the heading tags as well: a colour and a margin will be enough for now. You don’t need much, just some initial styling to make things easier and more inspiring to start working with.</p>
<p><em>body { background: #423C4D;<br />
color: #C4C1C8;<br />
margin: 0 auto;<br />
padding: 100px 0;<br />
width: 660px; }</em></p>
<p><em>h1, h2, h3, h4, h5, h6 {<br />
color: #fff;<br />
margin: 24px auto 12px; }</em></p>
<p><strong>03. Body font</strong><br />
Next comes what’s probably the most important step on any website you’ll ever code: defining the global (default) font for the website. Define its line height, which is the space between lines of text, its font size and its font family. Helvetica Neue is an excellent specimen for our next experiments. You can go funky and add some text shadow to improve readability.</p>
<p><em>body {<br />
background: #423C4D;<br />
color: #C4C1C8;<br />
font-family: ‘Helvetica Neue’, Arial,  Helvetica, sans-serif;<br />
font-size: 12px;<br />
line-height: 1.6;<br />
margin: 0 auto;<br />
padding: 100px 0;<br />
text-shadow: 1px 1px rgba(0,0,0,.8);<br />
width: 660px; }</em></p>
<p><em> </em></p>
<p><em>h1, h2, h3, h4, h5, h6 {<br />
color: #fff;<br />
line-height: 1.2;<br />
margin: 24px auto 12px;<br />
text-shadow: none; }</em></p>
<p><strong>04. Custom fonts</strong><br />
To integrate a custom font on your website, all you need is the source file. However, different browsers support different formats, so normally you’ll want to convert your ‘.ttf’ file to all of them for a real cross-browser experience. A great tool for this can be found at http://fontsquirrel.com/fontface/generator. IMPORTANT: Make sure the font’s licence allows for @font-face embedding.</p>
<p><strong>05. @font-face</strong><br />
You may use a tool (like Font Squirrel’s) to generate the code, but it’s wise to understand it first. Using @font-face is simple: for each font you begin defining its name with the ‘font-family’ property, and then point out the font location within ‘src’. Note that ‘.eot’ file (for IE) must be in a different line.</p>
<p><em>@font-face {</em></p>
<p><em> </em></p>
<p><em>font-family: &#8216;CaviarDreamsRegular&#8217;;</em></p>
<p><em> </em></p>
<p><em>src: url(&#8216;fonts/CaviarDreams-webfont.eot&#8217;);</em></p>
<p><em> </em></p>
<p><em>src: url(&#8216;fonts/CaviarDreams-webfont.eot?#iefix&#8217;) format(&#8216;embedded-opentype&#8217;),</em></p>
<p><em> </em></p>
<p><em>url(&#8216;fonts/CaviarDreams-webfont.woff&#8217;) format(&#8216;woff&#8217;),</em></p>
<p><em> </em></p>
<p><em>url(&#8216;fonts/CaviarDreams-webfont.ttf&#8217;) format(&#8216;truetype&#8217;),</em></p>
<p><em> </em></p>
<p><em>url(&#8216;fonts/CaviarDreams-webfont.svg#CaviarDreamsRegular&#8217;) format(&#8216;svg&#8217;);</em></p>
<p><em> </em></p>
<p><em>}</em></p>
<p><strong>06. Using @font-face fonts</strong><br />
Now that you’ve defined your fonts, you can start using them with the ‘font-family’ CSS property. Just add the name you defined in the previous step to any selector. You can now adjust its size, line height, colour or any other style you want. It’s as styleable as any Arial text!</p>
<p><em>h1 {</em></p>
<p><em> </em></p>
<p><em>font-size: 42px;</em></p>
<p><em> </em></p>
<p><em>font-family: CaviarDreamsRegular, &#8216;Helvetica Neue&#8217;, Arial, Helvetica, sans-serif;</em></p>
<p><em> </em></p>
<p><em>font-weight: 100;</em></p>
<p><em> </em></p>
<p><em>text-align: center;</em></p>
<p><em> </em></p>
<p><em>width: 500px;</em></p>
<p><em> </em></p>
<p><em>}</em></p>
<p><strong>07. Font-weight fun</strong><br />
Something that goes unnoticed most of the time is that ‘font-weight’ serves for more than ‘bold’ and ‘normal’. You can set any multiple of 100 from 100 to 900, where 400 is the same as normal, and 700 is bold. For example, using Helvetica Neue with font-weight 100, we get a beautiful Ultra Light version.</p>
<p><em>h2 {font-size: 36px; font-weight: 100; letter-spacing: .1em;}</em></p>
<p><strong>08. Text-shadow</strong><br />
CSS3 has a very versatile module called ‘text-shadow’. Its syntax is simple: first comes the x position, then the y position, then the feathering of the shadow, and lastly the colour. Text-shadow can be really useful to increase readability of a chunk of text, by having it offset. You can also create some nice effects with it.</p>
<p><em>h3 {</em></p>
<p><em> </em></p>
<p><em>font-size: 38px;</em></p>
<p><em> </em></p>
<p><em>text-shadow: 5px 5px black;</em></p>
<p><em> </em></p>
<p><em>position: relative;</em></p>
<p><em> </em></p>
<p><em>}</em></p>
<p><strong>09. Handwritten notes</strong><br />
One of the advantages of @font-face is that you can add a lot more personality to blocks of content within your design. A handwritten note, for example. You can use a handwritten font for the box, a notepad background and assign a line-height so the text fits in the grid. The effect is very unique.</p>
<p><em>blockquote {</em></p>
<p><em> </em></p>
<p><em>background: #918F94 url(&#8216;bg-notepad.jpg&#8217;) left 10px;</em></p>
<p><em> </em></p>
<p><em>color: #333;</em></p>
<p><em> </em></p>
<p><em>float: right;</em></p>
<p><em> </em></p>
<p><em>font-family: DesyrelRegular;</em></p>
<p><em> </em></p>
<p><em>font-size: 18px;</em></p>
<p><em> </em></p>
<p><em>line-height: 23px;</em></p>
<p><em> </em></p>
<p><em>margin: 0 -24px 1em 1em;</em></p>
<p><em> </em></p>
<p><em>padding: 10px 15px;</em></p>
<p><em> </em></p>
<p><em>text-shadow: -1px -1px rgba(0,0,0,.15);</em></p>
<p><em> </em></p>
<p><em>width: 300px;</em></p>
<p><em> </em></p>
<p><em> -webkit-box-shadow: 2px 2px white;</em></p>
<p><em> </em></p>
<p><em>-moz-box-shadow: 3px 3px 3px rgba(0,0,0,.35);}</em></p>
<p><em> </em></p>
<p><em> blockquote p {margin: 0;}</em></p>
<p><em> </em></p>
<p><em>blockquote p:first-of-type {text-indent: 0;}</em></p>
<p><strong>10. Text-transform</strong><br />
For the times where your content will be user-submitted and you want to keep it in a certain format, text-transform can be of tremendous help. You can transform text to lowercase, uppercase or capitalise it. This can be very useful for some handwritten fonts where you want proper capitalisation, since uppercase characters are highly adorned.</p>
<p><em>h4 {</em></p>
<p><em> </em></p>
<p><em>font-family: CaviarDreamsRegular, &#8216;Helvetica Neue&#8217;, Arial, Helvetica, sans-serif;</em></p>
<p><em> </em></p>
<p><em>font-size: 36px;</em></p>
<p><em> </em></p>
<p><em>font-weight: normal;</em></p>
<p><em> </em></p>
<p><em>text-transform: lowercase;}</em></p>
<p><em> </em></p>
<p><em>h4 strong {text-transform: uppercase;}</em></p>
<p><strong>11. Letter-spacing</strong><br />
Another powerful tool for styling your text, CSS’s letter spacing will add or remove space between characters. You can use any unit you may like, but ems are recommended to keep the aspect ratio between font sizes. Big fonts tend to look better with bigger letter spacing. Apply this to your h4 to see a good example.</p>
<p><em>h4 {letter-spacing: .5em;}</em></p>
<p><strong>12. Font-stretch</strong><br />
Some fonts have a condensed and/or expanded style within, which often results in a very different-looking font. This can be very handy and save space and bandwidth when using @font-face. Fortunately, there’s an easy way to use these styles. Setting the element’s font-stretch to condensed will give us a more impact-like font that’s very suitable for headers.</p>
<p><em>h5 {</em></p>
<p><em> </em></p>
<p><em>font-size: 30px;</em></p>
<p><em> </em></p>
<p><em>font-stretch: condensed;}</em></p>
<p><strong>13. Text-shadow revisited</strong><br />
You can have some more fun with the text-shadow property. You can stack more than one text shadow, making it possible to add a glow to your text to increase contrast, all while adding some double text to the background. Or you could even stack coloured glows!</p>
<p><em>h6 {</em></p>
<p><em> </em></p>
<p><em>font-size: 48px;</em></p>
<p><em> </em></p>
<p><em>font-stretch: condensed;</em></p>
<p><em> </em></p>
<p><em>padding: 10px;</em></p>
<p><em> </em></p>
<p><em>text-align: center;</em></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><em> </em></p>
<p><em>text-shadow: 3px 3px 8px #BD9E59,</em></p>
<p><em> </em></p>
<p><em>-3px -3px 8px #BD4B3B,</em></p>
<p><em> </em></p>
<p><em>-3px 3px 8px #7EBD56,</em></p>
<p><em> </em></p>
<p><em>3px -3px 8px #964BBD,</em></p>
<p><em> </em></p>
<p><em>-3px -3px rgba(255,255,255,.3);</em></p>
<p><em> </em></p>
<p><em>}</em></p>
<p><strong>14. Add gradients</strong><br />
You can give your text a bit of texture by filling it with a gradient above it. First, relative-position your element. Then create an :after pseudo class on your element, use an empty content declaration, absolute-position it above your text with roughly the same height and apply a gradient background to it (it can be an image as well).</p>
<p><em>h6 {position: relative;}</em></p>
<p><em> </em></p>
<p><em>h6:after {</em></p>
<p><em> </em></p>
<p><em>content: &#8220;&#8221;;</em></p>
<p><em> </em></p>
<p><em>display: block;</em></p>
<p><em> </em></p>
<p><em>height: 52px;</em></p>
<p><em> </em></p>
<p><em>left: 0;</em></p>
<p><em> </em></p>
<p><em>position: absolute;</em></p>
<p><em> </em></p>
<p><em>top: 15px;</em></p>
<p><em> </em></p>
<p><em>width: 100%;</em></p>
<p><em> </em></p>
<p><em> background: -moz-linear-gradient(top, rgba(66,60,77,.8) 0%, rgba(66,60,77,0) 90%);</em></p>
<p><em> </em></p>
<p><em>background: -webkit-linear-gradient(top, rgba(66,60,77,.8) 0%,rgba(66,60,77,0) 100%);</em></p>
<p><em> </em></p>
<p><em>background: linear-gradient(top, rgba(66,60,77,.8) 0%,rgba(66,60,77,0) 100%);}</em></p>
<p><strong>15. Transformations</strong><br />
You can rotate your text to any degree using the transform CSS property. Adding a 15 degree rotation can be a great way to have styled text positioned in, say, a badge on a product to grab attention. The transform property also has a scale option, which can make your text twice its size without changing its font-size.</p>
<p><em>h6 {</em></p>
<p><em> </em></p>
<p><em>-webkit-transform: rotate(-5deg) scale(1.5);</em></p>
<p><em> </em></p>
<p><em>-moz-transform: rotate(-5deg) scale(1.5);</em></p>
<p><em> </em></p>
<p><em>transform: rotate(-5deg) scale(1.5);}</em></p>
<p><strong>16. Text-stroke</strong><br />
Webkit brings you another nifty feature, which lets you add a stroke to your text. The property name is ‘webkit-text-stroke’ and its syntax is similar to border’s, but without the ‘border-style’. Note that so far this will only work on webkit browsers, so it’s advised to use -webkit-text-fill-color to compensate for any accessibility issues.</p>
<p><em>h6 {</em></p>
<p><em> </em></p>
<p><em>color: #fff;</em></p>
<p><em> </em></p>
<p><em> -webkit-text-stroke: 1px #333;</em></p>
<p><em> </em></p>
<p><em>-webkit-text-fill-color: #423C4D;}</em></p>
<p><strong>17. Hover effects</strong><br />
For places where mouse interactivity is a must, you can combine any of the styles mentioned and apply them to a :hover element. Paired with an :after and a few animations, you can grab the user’s attention fast and effectively. Animations on text elements go smoother than on graphics, so it’d be wise to use that advantage.</p>
<p><em>.fin {</em></p>
<p><em> </em></p>
<p><em>color: #fff;</em></p>
<p><em> </em></p>
<p><em>font-family: TangerineRegular, &#8216;Helvetica Neue&#8217;, Arial, Helvetica, sans-serif;</em></p>
<p><em> </em></p>
<p><em>font-style: italic;</em></p>
<p><em> </em></p>
<p><em>font-size: 120px;</em></p>
<p><em> </em></p>
<p><em>margin: 0;</em></p>
<p><em> </em></p>
<p><em>position: relative;</em></p>
<p><em> </em></p>
<p><em>text-align: center;</em></p>
<p><em> </em></p>
<p><em>text-shadow: 3px 3px black;</em></p>
<p><em> </em></p>
<p><em> -webkit-transition: all 1s ease-in-out;</em></p>
<p><em> </em></p>
<p><em>-moz-transition: all 1s ease-in-out;</em></p>
<p><em> </em></p>
<p><em>-o-transition: all 1s ease-in-out;</em></p>
<p><em> </em></p>
<p><em>}</em></p>
<p><em> </em></p>
<p><em> .fin:hover {</em></p>
<p><em> </em></p>
<p><em>-webkit-transform: rotate(-5deg) scale(1.5);</em></p>
<p><em> </em></p>
<p><em>-moz-transform: rotate(-5deg) scale(1.5);</em></p>
<p><em> </em></p>
<p><em>transform: rotate(-5deg) scale(1.5);</em></p>
<p><em> </em></p>
<p><em>}</em></p>
<p><em> </em></p>
<p><em>.fin:hover:after {</em></p>
<p><em> </em></p>
<p><em>content: &#8220;Fin&#8221;;</em></p>
<p><em> </em></p>
<p><em>display: block;</em></p>
<p><em> </em></p>
<p><em>height: 52px;</em></p>
<p><em> </em></p>
<p><em>left: 0;</em></p>
<p><em> </em></p>
<p><em>position: absolute;</em></p>
<p><em> </em></p>
<p><em>top: 0;</em></p>
<p><em> </em></p>
<p><em>width: 100%;</em></p>
<p><em> </em></p>
<p><em> text-shadow: 3px 3px 8px #BD9E59,</em></p>
<p><em> </em></p>
<p><em>-3px -3px 8px #BD4B3B,</em></p>
<p><em> </em></p>
<p><em>-3px 3px 8px #7EBD56,</em></p>
<p><em> </em></p>
<p><em>3px -3px 8px #964BBD,</em></p>
<p><em> </em></p>
<p><em>-3px -3px rgba(255,255,255,.3);}</em></p>
<p><strong>18. Bottom line</strong><br />
You’ve now got a very good understanding and knowledge to achieve rich texts in your designs. However, beware not to fall into bad practices. Abusing or overusing these new possibilities can prove detrimental to your designs. The general rule of thumb to follow with text is: if it doesn’t aid impact or legibility, it’s better off gone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/cross-browser-fonts-and-css-styling-rules/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create a basic HTML5 page with the new layout tags</title>
		<link>http://www.webdesignermag.co.uk/tutorials/create-a-basic-html5-page/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/create-a-basic-html5-page/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 13:16:02 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[layouts]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=6945</guid>
		<description><![CDATA[How to build a simple and semantic one-page template with HTML5]]></description>
			<content:encoded><![CDATA[<!--Final2--><p><img class="alignnone size-full wp-image-6949" title="Final" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/07/Final2.jpg" alt="Create a basic HTML5 page with the new layout tags" width="500" height="417" /></p>
<p><strong>Create a basic HTML5 page with the new layout tags</strong></p>
<p>How to build a simple and semantic one-page template with HTML5</p>
<p><strong>tools | tech | trends:</strong> Photoshop, Adobe Dreamweaver, HTML5<br />
<strong>expert:</strong> Neil Pearce</p>
<p>This article originally appeared in Web Designer issue 181, you can download the cover CD tutorial files by <a href="http://www.webdesignermag.co.uk/wp-content/uploads/2011/03/HTML5_Layout_Tags_with_PSD.zip" target="_blank">clicking here</a></p>
<p>In this tutorial, we’re going to build a one-page template using some of the next-generation techniques from HTML5. Everyone’s talking about HTML5, it’s perhaps the most-hyped technology since people started putting rounded corners on everything. Apparently though, HTML5 won’t be completely supported until 2022, but this is a misconception based on the projected date that HTML5 will reach the stage in the W3C process known as Candidate Recommendation (REC).All this means is that the spec won’t be completely finished until you can use all of it, and in at least two browsers. But don’t let that stop you from using the new tags now – after all, this industry moves so damn fast that it’s nice to be able to stay ahead for once!<br />
HTML5 introduces a bunch of new elements that will make our pages more semantic, cleaner and faster. It also includes fancy APIs for drawing graphics on screen, storing data offline, playing video and a lot more. The web industry is buzzing right now with the introduction of both HTML5 and CSS3, and if you couple that with jQuery (or any other JavaScript library), then you have some very powerful, sought-after skills all ready to take the industry by the scruff of the neck! So open up the supplied PSD design (on the CD) and let’s get cracking…</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><strong>01 Set things up</strong><br />
Before we jump into Photoshop, it’s always a good idea to create the basic markup first. Open up a new file in Dreamweaver (or your chosen editor), and name it ‘index.html’ and add the new and very simple doctype and head section. It isn’t even necessary for HTML5, but it’s used for current and older browsers that require a specified doctype. Browsers that do not understand this doctype will render the markup in Standards mode.</p>
<p>001 <em>&lt;!DOCTYPE html&gt;</em><br />
002 <em>&lt;html&gt;</em><br />
003 <em>&lt;head&gt;</em><br />
004 <em>&lt;meta http-equiv=”Content-Type” content=”text/html; charset=utf-8”&gt;</em><br />
005 <em>&lt;!&#8211;[if lt IE 9]&gt;</em><br />
006 <em>&lt;script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”&gt;&lt;/script&gt;</em><br />
007 <em>&lt;![endif]&#8211;&gt;</em><br />
008 <em>&lt;link rel=”stylesheet” href=”styles.css”&gt;</em><br />
009 <em>&lt;title&gt;Web designer&lt;/title&gt;</em><br />
010 <em>&lt;/head&gt;</em></p>
<p><strong>02 Inside the head</strong><br />
As you can see, the new doctype is much cleaner than what you would have if you were writing HTML4 or XHTML. You will also notice the link to the style sheet is missing its type attribute. This is no longer necessary, as it’s implied that this link refers to style sheets. This is also true for any links to scripts that you may use.</p>
<p>001 <em>&lt;link rel=”stylesheet” href=”styles.css”&gt;</em><br />
002 <em>&lt;script src=”js/scripts.js”&gt;&lt;/script&gt;</em></p>
<p><strong>03 HTML5 shiv</strong><br />
In IE, excluding the newest version (IE9), you cannot apply styles to elements that the browser does not recognise and our new HTML5 elements, in all their glory, are not recognised to CSS rules. This is where Remy Sharp’s html5shiv comes to the rescue.<br />
Simply include the link in your page’s &lt;head&gt; section and you will be able to style the new HTML5 elements without fear.</p>
<p>001 <em>&lt;!&#8211;[if lt IE 9]&gt; </em><br />
002 <em>&lt;script src=”http://html5shiv.googlecode.com/svn/trunk/html5.js”&gt;&lt;/script&gt;</em><br />
003 <em>&lt;![endif]&#8211;&gt;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/create-a-basic-html5-page/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Create 3D transform effects with CSS and HTML</title>
		<link>http://www.webdesignermag.co.uk/tutorials/3d-transforms-with-css/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/3d-transforms-with-css/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 11:35:37 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[transforms]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=6882</guid>
		<description><![CDATA[The upsurge in CSS3 and HTML5 brings us features like the 3D transform]]></description>
			<content:encoded><![CDATA[<!--Final1--><!--step1tif--><p><strong>Create 3D transform effects with CSS and HTML</strong></p>
<p><strong><img class="alignnone size-full wp-image-6895" title="Create 3D transform effects with CSS and HTML" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/07/Final1.jpg" alt="Create 3D transform effects with CSS and HTML" width="350" height="525" /><br />
</strong></p>
<p><strong>tools | tech | trends:</strong> A web editor, a WebKit-based browser, HTML, CSS3<br />
<strong>expert:</strong> Sam Hampton-Smith<br />
(This article originally appeared in Web Designer issue 179)</p>
<p>You can download the projects files by <a href="http://www.webdesignermag.co.uk/wp-content/uploads/2010/12/3D_Tranformations.zip" target="_blank">clicking here</a></p>
<p>Web designers have all these lovely new HTML5 tags to work with, and a whole raft of additional CSS properties to play with. The result is, or will be, a shift forward in what is possible using standard semantic and accessible markup. The limitations we’ve learnt to overcome are being swept away in a rush of exciting new possibilities<br />
One such innovation is the idea of CSS-based transformations, transitions and animations. The premise is simple – we assign and the browser interpolates between the existing state and the new state in response to an event. So, for example, when you rollover a button a transition might change the colour of the button from red to blue, but instead of flicking between the two, the browser will shift through purple to get there. There’s a stage beyond in the draft CSS3 specification, and it’s operational inside some browsers including Safari: 3D transformations. Here we’re going to create a 3D cube to hold our page content. Each face will contain information, and we’ll add buttons to move between them. The browser will handle the cube’s rotation, leaving us with an effect entirely rendered in HTML and CSS! The full code for the steps can be found in the project files.</p>
<p><strong>01 Open the start document</strong></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><img class="alignnone size-full wp-image-6885" title="Create 3D transform effects with CSS and HTML" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/07/step1tif.jpg" alt="Create 3D transform effects with CSS and HTML" width="500" height="799" /></p>
<p>We’ve created a standard page which you’ll find in the project files. In our page, named start.html, we’ve got a container &lt;div&gt;, a “viewport” &lt;div&gt; and three “faces”. We’ve already added some basic styles to our three faces to make each distinct. Note that each of our divs flows one after the other.</p>
<p>001 <em>&lt;div id=”container”&gt;</em><br />
002     <em>&lt;div id=”cube”&gt;</em><br />
003         <em>&lt;div class=”face” id=”face1”&gt;…&lt;/div&gt;</em><br />
004         <em>&lt;div class=”face” id=”face2”&gt;…&lt;div&gt;</em><br />
005         <em>&lt;div&gt;</em><br />
006 <em>&lt;div&gt;</em></p>
<p><strong>02 Set up the viewport</strong><br />
Almost all the work you’ll do will be in the style sheet, so open up screen.css (found in the styles folder). If you’re going to use 3D transitions in WebKit you should define your viewpoint on the scene. We’ll used our container div as the viewport, so find the existing CSS for #container and add the code to set up the perspective and perspective origin.</p>
<p>001 <em>#container {</em><br />
002     <em>position:    relative;</em><br />
003   <em> width:        500px;</em><br />
004     <em>margin:        0;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/3d-transforms-with-css/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Enhanced typography with CSS3 &amp; JavaScript</title>
		<link>http://www.webdesignermag.co.uk/tutorials/enhanced-typography-with-css3-javascript/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/enhanced-typography-with-css3-javascript/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 10:58:23 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Fonts]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=6870</guid>
		<description><![CDATA[Say goodbye to the collection of five or so fonts used by every web designer…
]]></description>
			<content:encoded><![CDATA[<!--Final--><!--Step01--><!--google-font-directory--><p><strong>Enhanced typography with CSS3 &amp; JavaScript</strong></p>
<p><strong>tools | tech | trends:</strong> Web editor, jQuery and lettering.js plug-in, Google Fonts<br />
<strong>expert:</strong> Sam Hampton-Smith<br />
(This article first appeared in Web Designer issue 180)</p>
<p>Download the project files by <a href="http://www.webdesignermag.co.uk/wp-content/uploads/2011/01/Advanced_Typography.zip" target="_blank">clicking here</a></p>
<p><img class="alignnone size-full wp-image-6871" title="Enhanced typography with CSS3 & JavaScript" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/07/Final.jpg" alt="Enhanced typography with CSS3 & JavaScript" width="500" height="579" /></p>
<p>For a medium that was created with text in mind, the web has long suffered from an unnecessary restriction in the fonts available for use. This has led designers, keen to avoid bland look-a-like site designs, to seek workarounds involving images and text replacement tricks. While this has allowed for some really creative solutions and happy accidents, we are finally at a point where we can start to use a richer set of fonts to help communicate our messages.<br />
In this tutorial we look at one method for presenting a passage of text in a visually exciting manner, taking advantage of just two fonts (both outside the traditional web-safe font set) and examine how we can reduce the amount of markup required to create customised typography. We’ll achieve our layout by splitting paragraphs into lines, then using a jQuery plug-in to automatically wrap &lt;span&gt; tags around our text.<br />
Along the way we’ll look at what we can do to maximise visual impact, draw attention to particular key words, and create a coherent typographical poster. We’ll also look at a little bit of jQuery, and finally we’ll take advantage of WebKit transitions to add script-free interactivity to our page. The larger portions of code used here are included in full in the project files.</p>
<p><strong>01 Starting off</strong></p>
<p><img class="alignnone size-full wp-image-6872" title="Enhanced typography with CSS3 & JavaScript" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/07/Step01.jpg" alt="Enhanced typography with CSS3 & JavaScript" width="500" height="255" /></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p>Open up the start.html file from the CD. We’ve supplied the initial HTML code, and a simple script tag ready for you to insert a few lines of jQuery later on. The first thing you need to do is establish the visual approach you’re going to use. For this tutorial we’ve decided to opt for a typographical poster approach, so no graphics at all – everything will be rendered in HTML and CSS only.</p>
<p><strong>02 Take inspiration</strong><br />
Have a quick browse around the web to see what excites you visually. We found a couple of great looking sites while browsing the lettering js plug-in site (which we’ll use later on). The end result is that we’ve decided to go for a 760px wide design with a graphpaper background. Add the CSS below into a new CSS file, and link to it from the head section of your page.</p>
<p>001 <em>&lt;link rel=”stylesheet” type=”text/css” href=”styles/screen.css” /&gt;</em><br />
002 <em>&#8211;</em><br />
003 <em>body {</em><br />
004 <em>background:    url(pagebg.gif) repeat top left;</em><br />
005 <em>color:    #333;</em><br />
006 <em>}<br />
</em><br />
<strong>03 Hide everything</strong></p>
<p><img class="alignnone size-full wp-image-6873" title="Enhanced typography with CSS3 & JavaScript" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/07/google-font-directory.jpg" alt="Enhanced typography with CSS3 & JavaScript" width="500" height="626" /></p>
<p>As you’re going to be working on each section, it makes sense to hide the content you haven’t styled, so comment out everything after the &lt;h1&gt; tag. With the rest of the content hidden, it’s easy to see how the text fits together. Start by choosing a nice font to act as the title font for your page. Have a look on Google Fonts (http://code.google.com/webfonts). We’ve chosen Lobster, so add the recommended code at the top of your page, before your CSS file:</p>
<p>001 <em>&lt;link rel=”stylesheet” type=”text/<br />
css” href=”http://fonts.googleapis.com/<br />
css?family=Lobster” /&gt;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/enhanced-typography-with-css3-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create content for the HTML5 canvas tag</title>
		<link>http://www.webdesignermag.co.uk/tutorials/html5-canvas-tag/</link>
		<comments>http://www.webdesignermag.co.uk/tutorials/html5-canvas-tag/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 15:41:36 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=6738</guid>
		<description><![CDATA[In this tutorial we are going to download and install one of the plug-ins that allows us very simply to set up animation and interactivity in canvas.]]></description>
			<content:encoded><![CDATA[<!--final--><!--shot-1--><!--shot-2--><!--shot-3--><p><strong>Put your graphics straight into canvas in HTML5 with Illustrator</strong></p>
<p><img class="alignnone size-full wp-image-6754" title="Create content for the HTML5 canvas tag" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/06/final.jpg" alt="Create content for the HTML5 canvas tag" width="500" height="344" /></p>
<p>Following the jaw-dropping demonstration of Adobe Edge Prototype, a Flash style environment for creating interactive canvas content at the Adobe MAX conference (2010), you’ve probably been itching to get your hands on it. Until this is released as beta we’re all stuck with hand coding… well, maybe not. Illustrator has had some plug-ins written for it from Adobe and third parties that give some amazing functionality right now, allowing you to create interactive animations for the canvas tag.<br />
In this tutorial we are going to download and install one of the plug-ins that allows us very simply to set up animation and interactivity in canvas. One of the issues of exporting to canvas is that all the information is stored in the drawing commands, made up of moveTo, lineTo etc. When it comes to moving content this becomes slow as the processor has to continually draw all of this each frame. So for complex shapes, we are going to export those as PNG images, to make the animation smoother. While on the subject of animation, it’s reasonably smooth in WebKit browsers like Chrome and Safari, but very stuttery in Firefox, so as yet it’s not going to see off Flash for some time!<br />
<strong><br />
tools|tech|trends:</strong> Illustrator CS5, Dreamweaver, HTML5<br />
This tutorial originally appeared in Web Designer issue 179 (13/01/11), authored by Mark Shufflebottom. You can download the project files by <a href="http://www.webdesignermag.co.uk/wp-content/uploads/2010/12/HTML5_Animations.zip" target="_blank">clicking here</a></p>
<p><strong>1) Get a copy of AI &gt; Canvas</strong></p>
<p><img class="alignnone size-full wp-image-6739" title="Create content for the HTML5 canvas tag" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/06/shot-1.jpg" alt="Create content for the HTML5 canvas tag" width="500" height="313" /></p>
<p>Open the page <a href="http://visitmix.com/labs/ai2canvas/" target="_blank">http://visitmix.com/labs/ai2canvas/</a> in your web browser and download the plug-in for your operating system. When the ZIP file has downloaded and extracted, you will have an Illustrator plug-in file. Open the Illustrator application folder on your server and drop the plug-in into the plug-ins folder.</p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><strong>2) Start Illustrator</strong></p>
<p><img class="alignnone size-full wp-image-6750" title="Create content for the HTML5 canvas tag" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/06/shot-2.jpg" alt="Create content for the HTML5 canvas tag" width="500" height="313" /></p>
<p>Open Illustrator and create a new document, choose ‘web’ for the profile and change the pixel settings to 1024 x 768. Click OK. From the disc open the file ‘logo.ai’ from the ‘start’ folder. Select all and copy the image. Close the logo and paste the logo in your new document.</p>
<p><strong>3) Export to canvas</strong></p>
<p><img class="alignnone size-full wp-image-6749" title="Create content for the HTML5 canvas tag" src="http://www.webdesignermag.co.uk/wp-content/uploads/2011/06/shot-3.jpg" alt="Create content for the HTML5 canvas tag" width="500" height="313" /></p>
<p>Add some text as shown in the screenshot above to complete the logo. Once you’ve done that go to File&gt;Save, saving the file as ‘canvas.ai’. Now choose File&gt;Export and export as ‘&lt;canvas&gt;, (html)’ in the same place as you saved your file. The exported file will open in your web browser, take a look at the source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/tutorials/html5-canvas-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build a Twitter app with jQuery Mobile</title>
		<link>http://www.webdesignermag.co.uk/blog/build-a-twitter-app-with-jquery-mobile/</link>
		<comments>http://www.webdesignermag.co.uk/blog/build-a-twitter-app-with-jquery-mobile/#comments</comments>
		<pubDate>Wed, 04 May 2011 16:54:01 +0000</pubDate>
		<dc:creator>Mark Billen</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[Mohu]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.webdesignermag.co.uk/?p=6602</guid>
		<description><![CDATA[Create and code a Twitter feed app with the talented team at Studio Mohu]]></description>
			<content:encoded><![CDATA[<p><strong>Build a Twitter app with jQuery Mobile</strong></p>
<p>Create and code a Twitter feed app with the talented team at Studio Mohu</p>
<p>tools | tech | trends jQuery Mobile, HTML5, PHP<br />
expert Ben Smith / Studio Mohu (<a href="http://www.studiomohu.com" target="_blank">www.studiomohu.com</a>)<br />
This article originally appeared in issue 179, you can download the project files <a href="http://www.webdesignermag.co.uk/wp-content/uploads/2010/12/iPhone_Twitter_App.zip" target="_blank">here</a></p>
<p>jQuery needs little introduction, the JavaScript framework has dominated the world of front-end development for creating rich internet applications over the last four years. jQuery Mobile, now in alpha development, looks set to do the same for the rapidly emerging mobile market by building on top of jQuery’s solid foundations. In this tutorial we’ll dive right in and make a simple application pulling several Twitter feeds from topical websites that might be useful to a fledgeling web designer. jQuery Mobile comes with a bunch of interface themes and interactions which will allow us to rapidly deploy our app without getting bogged down in code.<br />
jQuery Mobile does use progressive enhancement to ensure your app will work across a broad range of mobile devices. That said, for this tutorial we’ll be focusing on developing for the iPhone. We’ll be using HTML5, CSS and a sprinkling of PHP for grabbing and outputting the Twitter feeds. It’s useful to have a local development environment set up to view the results of the PHP files, but otherwise you can upload to your web hosting. It’s worth noting at this stage that jQuery Mobile is in alpha release so it might not be suitable for all project environments. Also, the full code for all the steps here can be found on the cover disc.</p>
<p><strong>1) Set up index.php</strong><br />
Let’s dive right in and create an index.php file with the super-simple HTML5 doctype. For best practice declare your encoding as UTF-8 in the head and give your page a title of “Web Designer Feed”.</p>
<p><em>001 &lt;!DOCTYPE html&gt; <br />
002 &lt;html&gt;<br />
003    &lt;head&gt;<br />
004       &lt;meta charset=”UTF-8”&gt;</em></p>

					<div class="adInPost">
						<script type="text/javascript">
							GA_googleFillSlot("WD_MidPage_MPU1");
						</script>
					</div><p><strong>2) Get jQuery</strong><br />
All it takes to add jQuery Mobile to your page is to create three links in your head to the jQuery Mobile CSS file and two JavaScript files. Grab the latest versions of jQuery and jQuery Mobile (as of writing these are jquery-1.4.3 and jquery.mobile-1.0a2 respectively). Luckily you don’t actually need to download these as jQuery provides hosted versions on its content delivery network.</p>
<p><em>001 &lt;link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css” /&gt;<br />
002 &lt;script src=”http://code.jquery.com/jquery-1.4.3.min.js”&gt;&lt;/script&gt;</em></p>
<p><strong>3) Define page structure</strong><br />
jQuery Mobile responds to various data-role tags in your code to activate default framework behaviours. Define your page by creating a &lt;div&gt; tag inside the body tag with an attribute of data-role=”page”. You can create three more containers for your header, content and footer with their respective data-role attributes.</p>
<p><em>001 &lt;div data-role=”page”&gt;<br />
002    &lt;header data-role=”header”&gt;<br />
003    &lt;/header&gt;</em></p>
<p><strong>4) Add list content</strong><br />
Populate your page with some content. Add an h1 tag with your application name inside the header tags. In your content area create an unordered list with a data-role attribute of “listview”. Add some list-items of Twitter feeds with titles in h3 tags and a short description of the feed in paragraph tags.</p>
<p><em>001 &lt;header data-role=”header”&gt;<br />
002    &lt;h1&gt;Web Designer Feed&lt;/h1&gt;<br />
003 &lt;/header&gt;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdesignermag.co.uk/blog/build-a-twitter-app-with-jquery-mobile/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

