<?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>The Mind of Mike Daub &#187; Web Design</title>
	<atom:link href="http://blog.mikedaub.com/tag/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mikedaub.com</link>
	<description>Common Sense is my Superpower.</description>
	<lastBuildDate>Sat, 17 Apr 2010 08:43:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Obama Countdown Clock Code</title>
		<link>http://blog.mikedaub.com/2009/11/09/obama-countdown-clock-code/</link>
		<comments>http://blog.mikedaub.com/2009/11/09/obama-countdown-clock-code/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 01:43:33 +0000</pubDate>
		<dc:creator>Mike Daub</dc:creator>
				<category><![CDATA[America]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Clock]]></category>
		<category><![CDATA[Countdown]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Obama]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://mikedaub.com/wordpress/?p=232</guid>
		<description><![CDATA[Obama Countdown Clock code snippets, both PHP and JavaScript.]]></description>
			<content:encoded><![CDATA[<p>Some of you have remarked that you like the Obama Countdown Clock on my <a href="http://mikedaub.com">home page</a>. For those of you who would like to create your own, I give you the necessary code. These code snippets will print the time remaining in the Obama administration in the format: “1460d 23h 59m 59s”.</p>
<p>Note that the Obama failure will end with the inauguration of the next president, which is scheduled to occur on January 20, 2013, at 12 Noon, Eastern Standard Time. In computer system time, this is 1,358,701,200 (seconds since Jan 1, 1970, 00:00:00 UTC).</p>
<p>The first option, if you would like a static clock, is to create it using PHP. This clock is calculated by the web server, and will only be updated whenever the web page is reloaded.</p>
<pre>&lt;?php
  $datearray=getdate();
  $sectot=1358701200-$datearray[0];
  $seconds=$sectot%60;
  $mintot=floor($sectot/60);
  $minutes=$mintot%60;
  $hourtot=floor($mintot/60);
  $hours=$hourtot%24;
  $days=floor($hourtot/24);
  echo($days);
  echo("d ");
  if ($hours&lt;10) echo("0");
  echo($hours);
  echo("h ");
  if ($minutes&lt;10) echo("0");
  echo($minutes);
  echo("m ");
  if ($seconds&lt;10) echo("0");
  echo($seconds);
  echo("s");
?&gt;</pre>
<p>The second option, for a dynamic clock, is to create it using Javascript. This clock is calculated by the web browsing computing, and it will update the clock once per second.</p>
<p>First step, create a file called “obamacountdownclock.js”, containing the following function:</p>
<pre>function obamaCountdownClock()
  {
  var now = new Date();
  var tnow = now.getTime();
  var msectot = 1358701200000-tnow;
  var sectot = Math.ceil(msectot/1000);
  var mintot = Math.floor(sectot/60);
  var seconds = sectot%60;
  var hourtot = Math.floor(mintot/60);
  var minutes = mintot%60;
  var days = Math.floor(hourtot/24);
  var hours = hourtot%24;
  if (hours&lt;10) {hours="0"+hours};
  if (minutes&lt;10) {minutes="0"+minutes};
  if (seconds&lt;10) {seconds="0"+seconds};
  document.getElementById('obamaclock').innerHTML = days+"d "+hours+"h "+minutes+"m "+seconds+"s";
  t=setTimeout('obamaCountdownClock()',1000);
  }</pre>
<p>Next, in the head section of your html code, add the following line to load the previous javascript file:</p>
<pre>&lt;<span>script</span><span> type</span>=<span>"text/javascript" </span><span>src</span><span>="</span><a href="view-source:http://mikedaub.com/javascript/obamacountdownclock.js">obamacountdownclock.js</a><span>"</span>&gt;&lt;/<span>script</span>&gt;</pre>
<p>Finally, add the following text inside your html code, where you would like the clock to appear:</p>
<pre>&lt;<span>span</span><span> id</span>=<span>"obamaclock"</span>&gt;&lt;/<span>span</span>&gt;
&lt;<span>script</span><span> type</span>=<span>"text/javascript"</span>&gt;obamaCountdownClock()&lt;/<span>script</span>&gt;</pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikedaub.com/2009/11/09/obama-countdown-clock-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pet Peeve: Best viewed with Internet Explorer</title>
		<link>http://blog.mikedaub.com/2009/10/14/pet-peeve-best-viewed-with-internet-explorer/</link>
		<comments>http://blog.mikedaub.com/2009/10/14/pet-peeve-best-viewed-with-internet-explorer/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 07:00:12 +0000</pubDate>
		<dc:creator>Mike Daub</dc:creator>
				<category><![CDATA[Website]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Peeve]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WWW]]></category>

		<guid isPermaLink="false">http://mikedaub.com/wordpress/?p=227</guid>
		<description><![CDATA[Do you remember the old "Best viewed with Netscape" and "Best viewed with Internet Explorer" buttons that commonly appeared on most websites a decade ago? ]]></description>
			<content:encoded><![CDATA[<p>As I was filling out an online job application recently, I read the following words:</p>
<blockquote><p>Note: If you are viewing this page through a different browser (i.e. AOL, Mozilla Firefox, Netscape, Safari, Opera), please close it out and reopen through Internet Explorer or all features of this application will not work.</p></blockquote>
<p>Also, recently, I was required to complete an online orientation course for a college where I currently teach. (I will not mention the college name here, although you could probably figure it out if you view my <a href="http://mikedaub.com/resume/">resume</a>.) I attempted to access the course with <a href="http://www.mozilla.com/?from=sfx&amp;uid=255598&amp;t=315">Mozilla Firefox</a>, my usual browser. No good. Next, I tried <a href="http://www.opera.com/">Opera</a>. No good either. By now, I was irritated. I tried both <a href="http://www.apple.com/safari/">Apple&#8217;s Safari</a> and <a href="http://www.google.com/chrome">Google&#8217;s Chrome</a> out of spite. As expected, their website failed again. Finally, I turned to <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">Internet Explorer</a> and was able to access the course. Later, I found the system requirements page for their website, and Internet Explorer is listed as a requirement.</p>
<p>Now the scary part: This college offers an associate degree program in <strong>Web Development</strong>!</p>
<p>This aggravates me. Not everybody uses Microsoft&#8217;s Internet Explorer. Depending on who you ask, anywhere from 50% to 80% of people browse the web with Internet Explorer. Or, alternately, 20% to 50% of people use a different browser; this is a significant number of people.</p>
<p>I&#8217;ve seen this before. Do you remember the old &#8220;Best viewed with Netscape&#8221; and &#8220;Best viewed with Internet Explorer&#8221; buttons that commonly appeared on most websites a decade ago? It was a nightmare. Half of the websites did not work properly with your preferred browser. I thought we were past these &#8220;browser wars&#8221;.</p>
<p>This is why we have <a href="http://www.w3.org/">web standards</a>.</p>
<p>One of the major issues on the web is making sites available to all people, whatever their hardware and software. Presently, all modern web browsers possess decent support for web standards. Is it not reasonable to expect web sites and applications to conform to these standards?</p>
<p>There is no good excuse to not adopt web standards in your web development work. At the very least, you should check that your web sites and applications work properly in the five major browsers: IE, Firefox, Opera, Chrome, and Safari.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikedaub.com/2009/10/14/pet-peeve-best-viewed-with-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Useful Web Building Sites</title>
		<link>http://blog.mikedaub.com/2009/07/21/useful-web-building-sites/</link>
		<comments>http://blog.mikedaub.com/2009/07/21/useful-web-building-sites/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 22:06:42 +0000</pubDate>
		<dc:creator>Mike Daub</dc:creator>
				<category><![CDATA[Website]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://mikedaub.com/wordpress/?p=55</guid>
		<description><![CDATA[Here are a few websites containing web building and design information and tutorials.  You might find them useful as you create your website, because every person should possess their own personal website.]]></description>
			<content:encoded><![CDATA[<p>Here are a few websites containing web building and design information and tutorials.  You might find them useful as you create your website, because every person should possess their own personal website, not the cheap <a href="http://www.facebook.com/mddaub">FaceBook</a> and <a href="http://www.myspace.com/mddaub">MySpace</a> falseness.</p>
<p><a href="http://www.opera.com/wsc/"><img class=" alignright" title="Opera Web Standards Curriculum: Learn to build a better Web with Opera" src="http://www.opera.com/bitmaps/company/education/wsc_104x78.jpg" alt="Opera Web Standards Curriculum: Learn to build a better Web with Opera" width="104" height="78" /></a>The <a href="http://www.opera.com/wsc/">Opera Web Standards Curriculum</a> is a free online tutorial course takes students from complete beginner to having a solid grounding in standards-based web design, including <a href="http://www.w3.org/html/">HTML</a>, <a href="http://www.w3.org/Style/CSS/">CSS</a>, and <a href="http://www.dmoz.org/Computers/Programming/Languages/JavaScript/">JavaScript</a> development.  This excellent course was created by <a href="http://www.opera.com/">Opera Software</a> (makers of the eponymous <a href="http://www.opera.com/browser/">web browser</a>) to promote web standards, efficiency, ease of maintenance, accessibility, device compatibility, and search optimization.</p>
<p><a href="http://www.w3schools.com/">W3Schools</a> is a collection of free HTML, CSS, JavaScript, DHTML, XML, XHTML, WAP, ASP, SQL tutorials with lots of working examples and source code. Their web site is a useful reference on a wide range of topics.</p>
<p>The <a href="http://www.w3.org/">World Wide Web Consortium</a>, also known as W3C, develops the standards, protocols, and guidelines that make the world wide web operational. They also offer the <a href="http://validator.w3.org/">Markup Validator</a>, a free service that helps check the validity of your web pages against the web language standards.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikedaub.com/2009/07/21/useful-web-building-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
