<?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>Atomic Robot Design</title>
	<atom:link href="http://atomicrobotdesign.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://atomicrobotdesign.com/blog</link>
	<description>Design From The Future &#124; Blog</description>
	<lastBuildDate>Tue, 07 Sep 2010 01:46:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The great thing about HTML5 being open source</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/the-great-thing-about-html5-being-open-source/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/the-great-thing-about-html5-being-open-source/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 01:46:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=640</guid>
		<description><![CDATA[I’ve said on here before that one of the things some developers might not like about HTML5 is that others can easily see the code of anything you make. But at the same time, for anyone trying to learn it’s as easy as right-click &#62; view source. I love to take a look at code [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve said on here before that one of the things some developers might not like about HTML5 is that others can easily see the code of anything you make. But at the same time, for anyone trying to learn it’s as easy as right-click &gt; view source. I love to take a look at code and figure out what does what and that’s one of the great benefits of technology like HTML5/CSS/JavaScript. It’s all there in the open, so if you see something that interests you, you can very easily take a peak.</p>
<p>I’ve seen some amazing things done with Flash and while I would love to know how they did it, you need a decompiler to take a look at the code and all the assets. Some decompilers will rename library items and variables so it’s a lot harder to figure out what does what. Plus, in some ways, I’ve always felt there was an ethical question when it comes to decompling .swf files.</p>
<p>I love going to a site, like <a href="http://mrdoob.com/">Mr. Doob’s</a>, and being able to see the code so easily. It might be one of the reason’s that I’ve spent so much time lately messing around with HTML5, CSS3 and JavaScript.</p>
<p>I recently reader <a href="http://www.amazon.ca/Hackers-Heroes-Computer-Revolution-Anniversary/dp/1449388396/ref=sr_1_1?s=books&#038;ie=UTF8&#038;qid=1283821873&#038;sr=1-1">Hackers: Heroes of the Computer Revolution</a> and one of the main themes throughout the book was the Hacker Ethic, something that said make your hardware or software open source so that others could see what you’ve done and improve it which will make things better for everyone. If HTML5 takes off like it has the potential too, this idea will come back whether developers want it to or not.</p>
<p>Hopefully, developers out there take advantage of this and learn from what others have done. One of the things that gave Flash some bad press was developers making bloated and slow running programs. If a developer has the ability to look at someone else’s organized and efficent code, it might make them a better programmer and users will get better and smoother running programs.</p>
<p>Now if we can just get rid of the phases like “Runs best in Webkit” the future of the web is going to be wide open.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/the-great-thing-about-html5-being-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 games aren&#8217;t killing anything anytime soon</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/html5-games-arent-killing-anything-anytime-soon/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/html5-games-arent-killing-anything-anytime-soon/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 04:06:01 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=636</guid>
		<description><![CDATA[I came across the website HTML5games.com yesterday and there is some amazing stuff there. It’s one of those sites that makes you believe all the hype about HTML5. We’ll be making games that work for everyone without the need for a plug-in and it will all be open-source! This will all be true one day [...]]]></description>
			<content:encoded><![CDATA[<p>I came across the website <a href="http://www.html5games.com/">HTML5games.com</a> yesterday and there is some amazing stuff there. It’s one of those sites that makes you believe all the hype about HTML5. We’ll be making games that work for everyone without the need for a plug-in and it will all be open-source! This will all be true one day but I think we have a while yet. Why? A lot of the examples only work right in Safari or Chrome. It’s been a big enough challenge to get people to upgrade from Internet Explorer 6 to 7 and 8, and if IE9 doesn’t live up to it’s hype, I doubt enough people will move to Safari and Chrome to make HTML5 games a killer.</p>
<p>Also, take a look under the hood of some of these games. I’m amazed by the amount of JavaScript needed just to make something like Pong. I’ve said this before, but right not making HTML5 games is something that very experienced programmers are able to do. One of the things that made Flash great for making games is the actual Flash IDE. It’s pretty easy to get started with making a simple game because it only takes about 20 lines of code to create an object that you can control with the keyboard. Some of the examples I’ve seen take multiple JS files with a hundred lines of code each. The learning curve for HTML5 games is pretty high and I still think it’s going to take some kind of really kick ass IDE to allow beginners to start learning comfortably.</p>
<p>And I know there are developers out there that don’t want people to be able to take a look at their code and it’s as easy as right-click/view source to see how HTML5 games are made. And if you’ve spent weeks building a game for a company and then once you release it, anyone can come along and copy your code, it might be a reason for not wanting to make it using HTML5 and JavaScript. I realize this is all open source, but imagine how easy it would be to just copy and paste all the code and change the graphics a little bit.</p>
<p>I know this might come across as a “Flash guy” ranting but I’ve been spending a lot of time working with JavaScript and jQuery. I’ve never been a big fan of JavaScript but libraries like jQuery make it a lot easier to use. But I think for things like HTML5 games to take off, we’re going to need all the browsers to run JavaScript at the same speed and either an improved version of JS or an IDE that makes it easier to build them.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/html5-games-arent-killing-anything-anytime-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My top 5 code editors for Windows</title>
		<link>http://atomicrobotdesign.com/blog/general/my-top-5-code-editors-for-windows/</link>
		<comments>http://atomicrobotdesign.com/blog/general/my-top-5-code-editors-for-windows/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 02:37:37 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=631</guid>
		<description><![CDATA[In school, I had an entire class on Dreamweaver and even though the class showed you how to do everything with the program, I think I immediately forgot how to use anything to do with the Design view. I have always and always push others to hand code everything. Being a Windows guy, I don’t [...]]]></description>
			<content:encoded><![CDATA[<p>In school, I had an entire class on Dreamweaver and even though the class showed you how to do everything with the program, I think I immediately forgot how to use anything to do with the Design view. I have always and always push others to hand code everything. Being a Windows guy, I don’t get to use the popular Coda or Textmate editors, but I’ve found a few for Windows that kick some ass.</p>
<p><strong>1. <a href="http://notepad-plus-plus.org/">Notepadd++</a></strong></p>
<p>This was the editor that I felt comfortable enough with to drop Dreamweaver. It’s open source and 100% free, which is something everyone likes. It’s lightweight and customizable. Plus, it’s got one little feature that I need in my editors, it lets me move the tabs around. It doesn’t feature code hinting not does it close tags for you but I’ve found that has actually made me a better code.</p>
<p><strong>2. <a href="http://intype.info/home/index.php">Intype</a></strong></p>
<p>Intype is my editor of choice right now. So why isn’t it at the top? Well, it’s an alpha version, 0.3. So it’s got some bugs but I’ve found it’s a pretty good Windows alternative to Textmate. My main pet peeve with it is small and probably won’t matter to anyone else, but I can’t drag the tabs to reorganize them. If it’s the editor I use right now, why isn’t it the number one on the list? Well, it is an alpha version and when they release the finished version, it won’t be free.</p>
<p><strong>3. <a href="http://www.aptana.com/">Aptana</a></strong></p>
<p>Aptana is a great editor and features things like code assist and is can be considered an open source version of Dreamweaver. I found it easy to use because it’s Eclipse based and I’ve found it comfortable because I’ve used Flex/Flash Builder. But, unlike the previous two, it’s not lightweight and, while it’s highly customizable, it’s not as easy as Notepad++. It’s the editor I use when I’m working with PHP.</p>
<p><strong>4. <a href="http://www.adobe.com/products/dreamweaver/">Dreamweaver</a></strong></p>
<p>For the first couple of years, this was my editor of choice. And like most Adobe products, they’ve added more and more features with every new release. But with every feature, the program gets bigger and bigger and a lot it, I don’t use. Waiting a minute or two for the program to load up when I just want to make a couple of text changes can get a little annoying, plus I don’t have any use for the design view or the new Live view.</p>
<p><strong>5. <a href="http://www.microsoft.com/web/webmatrix/">Microsoft WebMatrix</a></strong></p>
<p>Surprisingly, Microsoft has actually made a lightweight and pretty nice editor and it’s free. It’s not all that customizable but it’s got a few interesting features, such as being able to log into databases and even has a SEO report function. I’m really surprised at Microsoft for putting this out and if it was more customizable, I think it would be higher on this list. I want to be able to change the tag colors and font which WebMatrix won’t let me do that, but it’s a beta so they might add some features.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/general/my-top-5-code-editors-for-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internet Explorer 9 just might bring on a golden age of browsers</title>
		<link>http://atomicrobotdesign.com/blog/general/internet-explorer-9-just-might-bring-on-a-golden-age-of-browsers/</link>
		<comments>http://atomicrobotdesign.com/blog/general/internet-explorer-9-just-might-bring-on-a-golden-age-of-browsers/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 02:47:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=626</guid>
		<description><![CDATA[Yeah, I know. That might be some hyperbole. But, then again, if IE9 can do everything Microsoft is claiming, then all that time we spend making sure things work in IE, might be put to use doing interesting things. I remember years ago, back during the browser wars, which were explained to me by my [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, I know. That might be some hyperbole. But, then again, if IE9 can do everything Microsoft is claiming, then all that time we spend making sure things work in IE, might be put to use doing interesting things.</p>
<p>I remember years ago, back during the browser wars, which were explained to me by my more nerdier friends, I was told Netscape was better and that’s what I used. Until, of course, a few years later when I was using IE6 because that’s what came on my computer and I was like a vast majority of people at the time and didn’t know there was other browsers or that there was any difference between them. And then, somehow, I discovered Firefox 1.5 and everything changed.</p>
<p>When I started web design in school, the IE7 beta was out and my teachers were excited for it because it was going to be so much better than IE6 but, of course, it wasn’t really that much better. And IE8 came out and was a little bit better, but now we just have to spend more time making sure that a website works in more than one version of IE (I stopped caring about IE6 over 6 months ago with the full support of my boss).</p>
<p>But, if Windows 7 is going to take over for XP next year in the corporate world, we might just be entering a world where Internet Explorer actually displays a website the same as the other major browsers. Think about that. I’m not talking about CSS3 transitions or animations, but just basic positioning. I don’t think I’ve ever made a site that didn’t require me to at least fix some minor issues with IE7.</p>
<p>IE9 won’t be the best browser out there, but it will, guaranteed, be the most used because the most people use Windows and most of them use IE. But at least it’s not going to suck and be a generation behind. We don’t need IE to innovate, we just need it to work, that’s what Webkit and Firefox are for.</p>
<p>Speaking of Firefox, Firefox 4 beta 3 has won me back. For a while now, I’d started using Chrome more and more but with this latest beta, I’ve gone back to FF. It’s just as faster and it’s just as powerful under the hood. Plus, I’m sure every browser will have something like <a href="http://vimeo.com/13560319">Tab Candy</a>, which is coming with the fourth beta I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/general/internet-explorer-9-just-might-bring-on-a-golden-age-of-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and easy way to make cool buttons using CSS3</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/quick-and-easy-way-to-make-cool-buttons-using-css3/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/quick-and-easy-way-to-make-cool-buttons-using-css3/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 01:48:17 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=619</guid>
		<description><![CDATA[Using some CSS3 and a bit of positioning, you can easily make good looking buttons for your web site. I’ve got two examples you can take a look at here. the first being buttons with a box-shadow. 1234567891011.button &#123; &#160; &#160;background:-moz-linear-gradient&#40;-90deg, #273C4F, #205275&#41;; &#160; &#160;background:-webkit-gradient&#40;linear, left top, left bottom, from&#40;#273C4F&#41;, to&#40;#205275&#41;&#41;; &#160; &#160;padding:10px 15px; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Using some CSS3 and a bit of positioning, you can easily make good looking buttons for your web site. I’ve got two examples you can take a look at here. the first being buttons with a box-shadow.</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-moz-linear-</span>gradient<span style="color: #00AA00;">&#40;</span>-90deg<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#273C4F</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#205275</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-webkit-</span>gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">,</span> from<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#273C4F</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> to<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#205275</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-moz-box-shadow<span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">3px</span> <span style="color: #933;">5px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-webkit-box-shadow<span style="color: #00AA00;">:</span><span style="color: #933;">3px</span> <span style="color: #933;">3px</span> <span style="color: #933;">5px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<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><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>We’ve got a gradient on the background and a box-shadow to give the button some depth. I’ve also added some padding so you can use this on an anchor tag and it will look good no matter what text you have. But what’s with the position:relative? That comes into play on the active state for the button.</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.button</span><span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-moz-box-shadow<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-webkit-box-shadow<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p><img src="http://atomicrobotdesign.com/blog/wp-content/uploads/2010/08/button1.jpg" alt="" title="button1" width="400" height="82" class="aligncenter size-full wp-image-621" /></p>
<p>What happens here is that the when the button is clicked, it moves down and left one pixel and the shadow is decrease by one pixel to give it the effect of going down when it’s clicked on.</p>
<p>Now these look like hovering buttons but the same effect can be had on buttons you want to look like they’re going down into the background.</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.button2</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-moz-linear-</span>gradient<span style="color: #00AA00;">&#40;</span>-90deg<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#1987FF</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#0055B2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-webkit-</span>gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">,</span> from<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#1987FF</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> to<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#0055B2</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<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><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Pretty much the same thing, but you’ll notice there’s no box-shadow. Now for the active state.</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.button2</span><span style="color: #3333ff;">:active </span><span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-moz-box-shadow<span style="color: #00AA00;">:</span><span style="color: #993333;">inset</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp;-webkit-box-shadow<span style="color: #00AA00;">:</span><span style="color: #993333;">inset</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p><img src="http://atomicrobotdesign.com/blog/wp-content/uploads/2010/08/button2.jpg" alt="" title="button2" width="400" height="82" class="aligncenter size-full wp-image-623" /></p>
<p>Now we add the box-shadow and set it to inset and it looks like the button is being pressed into the background. There’s one unexpected bug I came across with this one, the inset box-shadow doesn’t display right in Chrome on Windows, but it looks great in Firefox and in Safari. Why it doesn’t work in Chrome, I don’t know but hopefully, they’ll fix this bug quick, because I think this is a great looking effect that web designers have a real use for.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/quick-and-easy-way-to-make-cool-buttons-using-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There&#8217;s HTML5 and then there&#8217;s HTML5</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/theres-html5-and-then-theres-html5/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/theres-html5-and-then-theres-html5/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 05:03:43 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=613</guid>
		<description><![CDATA[I remember back in school, sometime in my second year, I read an article on A List Apart called A Preview of HTML5 and I was excited about the new tags, like &#60;header&#62; and &#60;footer&#62;. I was pretty sure &#60;video&#62; was going to make life a lot easier. But, really, that was it, it wasn’t [...]]]></description>
			<content:encoded><![CDATA[<p>I remember back in school, sometime in my second year, I read an article on A List Apart called A Preview of HTML5 and I was excited about the new tags, like &lt;header&gt; and &lt;footer&gt;. I was pretty sure &lt;video&gt; was going to make life a lot easier. But, really, that was it, it wasn’t a Flash killer or something to build amazing web apps, it was just a new version of HTML that would make my work a little easier. And over the last few years, I’d read articles about it and I was waiting for the day when I could start building sites using it. But then Apple changed everything.</p>
<p>We had a client talk to us about building them a new site and one of their questions was whether or not we knew how to build things using HTML5. It took me a minute, but I realized they didn’t mean HTML5 they way I thought about, they meant it the way Apple had been talking about it, as an all encompassing term that included CSS3 and JavaScript. And over the last six months this has pretty much become the norm, HTML5 means everything that you’d find in something like Apple’s HTML5 showcase or Google’s HTML5Rocks. Maybe it’s just me, but I don’t remember CSS3 transitions being a part of the HTML5 spec.</p>
<p>So it seems that HTML5 has become a term like Ajax, which stands for Asynchronous JavaScript and XML, even though it doesn’t have to include XML. Somebody just thought it sounded cool and started using it to reference a group of technologies that the name didn’t necessarily apply to. In the case of HTML5, it seems like it’s companies like Apple and Google that have spread the use of it as a name for a group of technologies that aren’t really under it’s umbrella.</p>
<p>But it seems that the web design and development community have accept this use and things like HTML5 apps, which use more than just HTML5 to work, are becoming widespread. I don’t have a problem with this but I just find it interesting that HTML5 has become an accepted buzz word so quickly and it’s acceptance is so widespread. And the next time a client brings up the term HTML5, I’ll know what they mean.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/theres-html5-and-then-theres-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move objects around the &lt;canvas&gt; using the keyboard and jQuery</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/move-objects-around-the-canvas-using-the-keyboard-and-jquery/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/move-objects-around-the-canvas-using-the-keyboard-and-jquery/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 03:55:38 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=605</guid>
		<description><![CDATA[One of the things that Flash is great at is making games and it’s one of the things that people are hyping the &#60;canvas&#62; tag being able to take over. Personally, I think it’s going to be a couple of years before that happens and one of the reasons is how much easier it is [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that Flash is great at is making games and it’s one of the things that people are hyping the &lt;canvas&gt; tag being able to take over. Personally, I think it’s going to be a couple of years before that happens and one of the reasons is how much easier it is to build games using Flash. In fact, I was trying to figure out how to allow a user to move a block around a &lt;canvas&gt; using the arrow keys and I was getting pretty frustrated. Until I realized I could just use jQuery.</p>
<p>I’m not going to go through the whole thing because it’s just the next step from an <a href="http://atomicrobotdesign.com/blog/htmlcss/animate-a-random-bouncing-ball-with-the-canvas-tag/">earlier &lt;canvas&gt; post</a> I did. But I’ll go over the changes and the great thing is, there isn’t too many. Plus, if you’ve ever made something similar in Flash, this will seem pretty familiar.</p>
<p><b>The HTML:</b></p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;init();&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;canvas <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;canvas&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;500&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;400&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>canvas&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Just setting the &lt;canvas&gt; height and width and setting the init() function to fire after the page loads.</p>
<p><b>The CSS:</b></p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">canvas <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <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><br />
&nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dashed</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>Nothing interesting here, a dashed border so we can see the edges of the &lt;canvas&gt; and the margin: auto to center it.</p>
<p><b>The JavaScript:</b></p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> context<span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> rightKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> leftKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> upKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> downKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> block_x<span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> block_y<span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> block_h <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> block_w <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#canvas'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; WIDTH <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#canvas'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; HEIGHT <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#canvas'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; block_x <span style="color: #339933;">=</span> WIDTH <span style="color: #339933;">/</span> <span style="color: #CC0000;">2</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">15</span><span style="color: #339933;">;</span><br />
&nbsp; block_y <span style="color: #339933;">=</span> HEIGHT <span style="color: #339933;">/</span><span style="color: #CC0000;">2</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">15</span><span style="color: #339933;">;</span><br />
&nbsp; setInterval<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'draw()'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context.<span style="color: #660066;">clearRect</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>WIDTH<span style="color: #339933;">,</span>HEIGHT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> rect<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>w<span style="color: #339933;">,</span>h<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context.<span style="color: #660066;">beginPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">rect</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>w<span style="color: #339933;">,</span>h<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">endPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>rightKey<span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">+=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>leftKey<span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">-=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>upKey<span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">-=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>downKey<span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">+=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>block_x <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>block_x <span style="color: #339933;">+</span> block_w<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> WIDTH<span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">=</span> WIDTH <span style="color: #339933;">-</span> block_w<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>block_y <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>block_y <span style="color: #339933;">+</span> block_h<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> HEIGHT<span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">=</span> HEIGHT <span style="color: #339933;">-</span> block_h<span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">fillRect</span><span style="color: #009900;">&#40;</span>block_x<span style="color: #339933;">,</span>block_y<span style="color: #339933;">,</span>block_w<span style="color: #339933;">,</span>block_h<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> onKeyDown<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">39</span><span style="color: #009900;">&#41;</span> rightKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">37</span><span style="color: #009900;">&#41;</span> leftKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">38</span><span style="color: #009900;">&#41;</span> upKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">40</span><span style="color: #009900;">&#41;</span> downKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> onKeyUp<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">39</span><span style="color: #009900;">&#41;</span> rightKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">37</span><span style="color: #009900;">&#41;</span> leftKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">38</span><span style="color: #009900;">&#41;</span> upKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">40</span><span style="color: #009900;">&#41;</span> downKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keydown</span><span style="color: #009900;">&#40;</span>onKeyDown<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keyup</span><span style="color: #009900;">&#40;</span>onKeyUp<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>So the first thing we do here is find the &lt;canvas&gt; using jQuery and get the height and width:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">context <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#canvas'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
WIDTH <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#canvas'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
HEIGHT <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#canvas'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>And instead of drawing a ball and animating it bouncing, we use the arrow keys to move it around</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>rightKey<span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">+=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>leftKey<span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">-=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>upKey<span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">-=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>downKey<span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">+=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>block_x <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>block_x <span style="color: #339933;">+</span> block_w<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> WIDTH<span style="color: #009900;">&#41;</span> block_x <span style="color: #339933;">=</span> WIDTH <span style="color: #339933;">-</span> block_w<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>block_y <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>block_y <span style="color: #339933;">+</span> block_h<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> HEIGHT<span style="color: #009900;">&#41;</span> block_y <span style="color: #339933;">=</span> HEIGHT <span style="color: #339933;">-</span> block_h<span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">fillRect</span><span style="color: #009900;">&#40;</span>block_x<span style="color: #339933;">,</span>block_y<span style="color: #339933;">,</span>block_w<span style="color: #339933;">,</span>block_h<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>If you’ve ever made a game with Flash or something similar, you should be able to see what’s going on here, we’re just saying, if the this key is pressed then move it this direction. Also, it checks to see if the block is at the edge, then don’t let it go any farther in that direction.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> onKeyDown<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">39</span><span style="color: #009900;">&#41;</span> rightKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">37</span><span style="color: #009900;">&#41;</span> leftKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">38</span><span style="color: #009900;">&#41;</span> upKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">40</span><span style="color: #009900;">&#41;</span> downKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> onKeyUp<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">39</span><span style="color: #009900;">&#41;</span> rightKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">37</span><span style="color: #009900;">&#41;</span> leftKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">38</span><span style="color: #009900;">&#41;</span> upKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">40</span><span style="color: #009900;">&#41;</span> downKey <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>With these two functions, we’re just checking if the one of the arrow keys has been pressed, then we change the corresponding variable to true and it will move. Likewise, we then check to see if it’s been released and then the variable will become false and it will stop moving.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keydown</span><span style="color: #009900;">&#40;</span>onKeyDown<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keyup</span><span style="color: #009900;">&#40;</span>onKeyUp<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Finally, we use the jQuery events keydown() and keyup() to simplify the process of checking if one of the arrow keys are being pressed.</p>
<p>And here’s a <a href="http://atomicrobotdesign.com/blog_media/canvas_move.html">demo</a> of what we get.</p>
<p>It’s nothing amazing right now, but this is the first step towards developing a game using &lt;canvas&gt;. Hopefully, as the technology evolves, we get events and methods like AS3’s hitTest to make game development a lot easier. As I’ve said before, right now the &lt;canvas&gt; is fun to fool around with, but I think we’re still a few years and an pretty good IDE away from it being something the average developer can really work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/move-objects-around-the-canvas-using-the-keyboard-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I made my own HTML/CSS template and you should too</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/i-made-my-own-htmlcss-template-and-you-should-too/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/i-made-my-own-htmlcss-template-and-you-should-too/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 05:01:46 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=601</guid>
		<description><![CDATA[In the last couple of days, a couple of HTML5 templates have been released, HTML5 Reset and HTML5 Boilerplate. I’ve looked them over and I have to say, especially in the case of HTML5 Boilerplate, they’re pretty solid. But they’re not for me. Why? Well, as soon as I looked at the index file, I [...]]]></description>
			<content:encoded><![CDATA[<p>In the last couple of days, a couple of HTML5 templates have been released, <a href="http://html5reset.org/">HTML5 Reset</a> and <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>. I’ve looked them over and I have to say, especially in the case of HTML5 Boilerplate, they’re pretty solid. But they’re not for me. Why? Well, as soon as I looked at the index file, I went through it thinking “I’d take out that and that and that.” It’s the same reaction I had when I looked at the 960 Grid template and a few others. It’s nothing against them or people that use them, it’s just they’re not for me.</p>
<p>Why not? Over time I’ve just made my own. It’s pretty simple and lean and made for the way I build websites. I’m sure I could take someone else’s more comprehensive template and alter it to fit my needs, but I think that would be more work. I’d rather start from zero and build my way up than to edit one down to fit my needs.</p>
<p>This works for me because I’ve been doing this for a while and when it comes to coding HTML/CSS and even JavaScript or ActionScript, I’m fast and I think a template like HTML5 Boilerplate is just going to slow me down. Maybe if I put in the time to sit down and start using one of these on the next few sites I build, I’d get used to it and it might end up working for me. But I know that the way I do it now works and I’m comfortable with it.</p>
<p>I think every web designer/developer should build their own template. If you want to modify one that’s out there, but change it to fit your style. I’m a huge believer that everything should be about making coding comfortable, from the languages you use to the editor you work in and setting up a template is no different.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/i-made-my-own-htmlcss-template-and-you-should-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animate a random bouncing ball with the &lt;canvas&gt; tag</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/animate-a-random-bouncing-ball-with-the-canvas-tag/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/animate-a-random-bouncing-ball-with-the-canvas-tag/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 05:14:23 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=595</guid>
		<description><![CDATA[I’ve been experimenting with the &#60;canvas&#62; tag the last few days and from what I’ve seen, it’s got potential but it’s got a ways to go before we’re replacing Flash with it. But, in order to learn how to use it, I’ve been trying to reproduce things I can remember making when I was first [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been experimenting with the &lt;canvas&gt; tag the last few days and from what I’ve seen, it’s got potential but it’s got a ways to go before we’re replacing Flash with it. But, in order to learn how to use it, I’ve been trying to reproduce things I can remember making when I was first learning Flash and ActionScript, and one of those things was a bouncing ball who’s movements where controlled through code.</p>
<p>To start off, here’s the HTML:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;canvas <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;canvas&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;300&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>canvas&gt;</span></div></td></tr></tbody></table></div>
<p>You have to assign the height and width of the &lt;canvas&gt; tag in the HTML because the default height is 150 pixels and the width is 300 and if you set the dimensions with CSS, the dimensions of the content inside the &lt;canvas&gt; will skew to the ratio of the CSS dimensions. For example, if you set the width to 600 pixels in the CSS and make a rectangle that’s 100 pixels wide, it will display at 200 pixels wide because you’ve double the width of the &lt;canvas&gt; with CSS. We also need to give the &lt;canvas&gt; an id of “canvas” so we can reference it with our JavaScript.</p>
<p>So for CSS, all I’ve included is this:</p>
<div class="codecolorer-container css twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#canvas</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">dashed</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></td></tr></tbody></table></div>
<p>It’s just there so that I can see the edges of the &lt;canvas&gt;.</p>
<p>JavaScript is what powers the &lt;canvas&gt; and to make this work, it takes about 35 lines of JS, not that much.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> canvasWidth <span style="color: #339933;">=</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; canvasHeight <span style="color: #339933;">=</span> <span style="color: #CC0000;">300</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_x <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_y <span style="color: #339933;">=</span> <span style="color: #CC0000;">44</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_dx <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_dy <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #003366; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'canvas'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<br />
&nbsp; setInterval<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'draw();'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context.<span style="color: #660066;">clearRect</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>canvasWidth<span style="color: #339933;">,</span>canvasHeight<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> ball<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context.<span style="color: #660066;">fillStyle</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#f00'</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">beginPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">arc</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>r<span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">fill</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #003366; font-weight: bold;">function</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; ball<span style="color: #009900;">&#40;</span>ball_x<span style="color: #339933;">,</span> ball_y<span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ball_x <span style="color: #339933;">+</span> ball_dx <span style="color: #339933;">&gt;</span> canvasWidth <span style="color: #339933;">||</span> ball_x <span style="color: #339933;">+</span> ball_dx <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; ball_dx <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>ball_dx<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ball_y <span style="color: #339933;">+</span> ball_dy <span style="color: #339933;">&gt;</span> canvasHeight <span style="color: #339933;">||</span> ball_y <span style="color: #339933;">+</span> ball_dy <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; ball_dy <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>ball_dy<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <br />
&nbsp; ball_x <span style="color: #339933;">+=</span> ball_dx<span style="color: #339933;">;</span><br />
&nbsp; ball_y <span style="color: #339933;">+=</span> ball_dy<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>So what are we doing here? Well, the first thing we do is define our variables:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> canvasWidth <span style="color: #339933;">=</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; canvasHeight <span style="color: #339933;">=</span> <span style="color: #CC0000;">300</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_x <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_y <span style="color: #339933;">=</span> <span style="color: #CC0000;">44</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_dx <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; ball_dy <span style="color: #339933;">=</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Ball_x and ball_y are our ball’s initial position and ball_dx and ball_dy are the speed our ball will be travelling.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #003366; font-weight: bold;">var</span> canvas <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'canvas'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context <span style="color: #339933;">=</span> canvas.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'2d'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<br />
&nbsp; setInterval<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'draw();'</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>In our init() function, we use the getElementById to find our &lt;canvas&gt; and then we set the context to 2D because right now that’s all you can do, although, one day we’re supposed to be able to set the &lt;canvas&gt; to 3D. Next, setInterval is what we use to actually make the animation fire. It will called the function draw() and it will fire every 24 milliseconds.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> draw<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; ball<span style="color: #009900;">&#40;</span>ball_x<span style="color: #339933;">,</span> ball_y<span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ball_x <span style="color: #339933;">+</span> ball_dx <span style="color: #339933;">&gt;</span> canvasWidth <span style="color: #339933;">||</span> ball_x <span style="color: #339933;">+</span> ball_dx <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; ball_dx <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>ball_dx<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ball_y <span style="color: #339933;">+</span> ball_dy <span style="color: #339933;">&gt;</span> canvasHeight <span style="color: #339933;">||</span> ball_y <span style="color: #339933;">+</span> ball_dy <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; ball_dy <span style="color: #339933;">=</span> <span style="color: #339933;">-</span>ball_dy<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <br />
&nbsp; ball_x <span style="color: #339933;">+=</span> ball_dx<span style="color: #339933;">;</span><br />
&nbsp; ball_y <span style="color: #339933;">+=</span> ball_dy<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>What we’re doing in the draw() function is redrawing the ball every time the function is fired. In the if statements, we see if the ball has reached the edge of the &lt;canvas&gt; and if it has, we reverse it’s direction. To redraw the ball, we call the ball() function by passing in 3 values, the ball’s x and y positions and the ball’s radius.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> ball<span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context.<span style="color: #660066;">fillStyle</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#f00'</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">beginPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">arc</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">,</span>y<span style="color: #339933;">,</span>r<span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">*</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; context.<span style="color: #660066;">fill</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>So when we pass in the new values, the ball() function will redraw the ball in it’s new position. The fillStyle sets the color to red and arc() sets the position, the radius, the starting point,  Math.PI * 2 sets the arc to a full circle and then true or false sets clockwise or counter-clockwise.</p>
<p>In the draw() function, you might have noticed a function called clearCanvas() being called. One of the big differences between the &lt;canvas&gt; and the stage for Flash is that the &lt;canvas&gt; is actually redrawing itself every time the setInterval fires and it won’t remove the old ball position. So, in order to get the effect we’re looking for, we need to clear the &lt;canvas&gt; every time the ball moves.</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> clearCanvas<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; context.<span style="color: #660066;">clearRect</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>canvasWidth<span style="color: #339933;">,</span>canvasHeight<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>To do this, we call the clearRect() function where we set the position to 0,0 and set the width and height to width and height of the &lt;canvas&gt;. This way, we will clear the &lt;canvas&gt; every time we redraw the ball which will make it look like the ball is bouncing around. If we don’t do this, then the ball won’t be removed and eventually the entire &lt;canvas&gt; will fill up.</p>
<p>Finally to make the JavaScript run, we need to add this to the body tag:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:800px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;init();&quot;</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Now, after the page loads, it will run the init() function. You can also attact this to a button or a link if you want to start the animation that way.</p>
<p>Check out the <a href="http://www.atomicrobotdesign.com/blog_media/canvas_animation.html">demo</a>.</p>
<p>So far, all the most complicated &lt;canvas&gt; examples I’ve seen have been done by hardcore programmers and are too complex to be something that people can realistically build for clients or even for fun. I think for &lt;canvas&gt; to really take off someone like Adobe is going to need to come out with an IDE that will do most of the heavy lifting for us. But for now, we can get started with things like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/animate-a-random-bouncing-ball-with-the-canvas-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be the Batman of web design</title>
		<link>http://atomicrobotdesign.com/blog/htmlcss/be-the-batman-of-web-design/</link>
		<comments>http://atomicrobotdesign.com/blog/htmlcss/be-the-batman-of-web-design/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 01:52:42 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://atomicrobotdesign.com/blog/?p=591</guid>
		<description><![CDATA[I’m a huge comic fan and as long as I can remember, Superman has been my favorite hero. But there’s a problem with Superman, he’s doesn’t make a very good role model. Why? Because Superman showed up on Earth and was immediately better than you at everything. That’s not really something you can aspire to [...]]]></description>
			<content:encoded><![CDATA[<p>I’m a huge comic fan and as long as I can remember, Superman has been my favorite hero. But there’s a problem with Superman, he’s doesn’t make a very good role model. Why? Because Superman showed up on Earth and was immediately better than you at everything. That’s not really something you can aspire to unless, of course, you are planning on going to a planet where no one is as good as you at web design!</p>
<p>Batman is the one superhero that people can look to for inspiration because he’s one of the few that’s just a man. But in order to become Batman, he worked and worked until he became the best at all the things he needed to master to accomplish what he set out to. It’s been changed a bit over the years, but Batman became an expert at martial arts, an escape artist, a detective and a scientist. And, over the years, it’s become apparent that Batman will always be the last guy standing.</p>
<p>So what does this have to do with web design? Well, from what I’ve learned over the years, no one just shows up and is great at everything that it takes to be a great web designer. There are no Supermen out there, there are only people that have worked their way to becoming Batman. To be a web design Batman, you need to know design, HTML/CSS, JavaScript and technologies like Flash or PHP. And you need to be good at all of them.</p>
<p>Of course, not everyone can be Batman but trying to get there will make you better at what you do. Although, you could be like the Flash and be really, really good at one thing but I don’t think anyone is going to say the Flash is cooler than Batman.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicrobotdesign.com/blog/htmlcss/be-the-batman-of-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
