Category Archives: Mobile

Simple Responsive Web Design

Just completed my first pass at making my site http://greggrichter.com, ‘Responsive’. For those not familiar with the term, it simply means that I am optimizing my site to dynamically change it’s layout depending on the screen size and device type you are accessing it from.  So users who come to my site from a smart phone will see the site optimized for their device.  Where as someone accessing the site from a traditional PC with a screen size of say 1000px wide, will receive a different view of the site.  This is of course a different approach than redirecting users to a mobile specific version of the site like you might see when you go to The Seattle Times. In that method, users that access http://seattletimes.com from an iPhone will be redirected to http://mobile.seattletimes.com for a layout optimized for their device.  Two completely separate pages.  The Responsive method I’m implementing serves up the same page for all device and screen sizes and dynamically adjusts the content and layout as specified. *note, at the time of this blog post, I have not implemented the same responsiveness to this blog.  Let’s call that phase 2.

For this initial pass, I took a very simplified approach. First, I had no desire to completely change the existing fixed width layout and code for my site so I left it as is. Second, I then used media queries to present new layout’s for pixel width breakpoints that I determined through trial and error. For now, I am only targeting traditional smart phone width’s and tablets in portrait mode as the site as-is renders fine in landscape mode. I will at some point need to add in even more breakpoints as the small tablet devices like the Kindle Fire and soon to be released iPad mini, will introduce a new set of users.

If I were to create a site from scratch I would be using fluid grid layouts with images that scale and up and down.  But again, I am retrofitting my existing site and want a simple and effective approach.

My three layouts then are:

greggrichter.com on a standard laptopExisting. Which looks great on anything at least 911px wide.

 

 

 

 

Large tablet portrait. Let’s be honest and call it an iPad. Anything less than 910px wide, but greater than #3, which is…

 

 

 

 

 

greggrichter.com on an iphoneSmart phone. Which I have set at anything less than 595px wide as the break point but actually the content is only about 286px wide.  I just center it.  Soon I’ll put another breakpoint in at 300px and build a mini-tablet layout for the 300 – 595px range.

 

 

 

 

To implement this is extremely simple. For each one of the breakpoints listed above, I added a media query to the end of my style sheet in the following format:

@media screen and (max-width: 910px){}

Within the two {} brackets, I grab my already established elements, id’s, classes, etc and apply new style rules to them. Only screens with a width of less than what I specify will render it.

Order matters here, so do these in order from top to bottom with biggest screen size at the top and smallest at the bottom.

For my smart phone view, I actually removed quite a bit of content like an image slideshow and other items and simply achieved this by using the CSS style ‘display:none’ on elements I didn’t want to be shown. Word of warning, just because you are using ‘display:none’ doesn’t mean you aren’t still downloading the entire page contents to the device… you are. I can get away with this on my site because I kept it extremely light to begin with.

You’ll also need to be sure and add a meta viewport tag to your header as follows:

<meta name=”viewport” content=”width=device-width, initial-scale=1.0″ />

If you want to get in deep with Responsive Web Design, then buy this book.

Also, here is a great article in Wikipedia on RWD, http://en.wikipedia.org/wiki/Responsive_Web_Design.

And here is a link to my sites stylesheet. Scroll to the bottom to see the media query pieces. http://greggrichter.com/css/gsr.css

Lastly, if you want to see RWD in action, load my main page, http://greggrichter.com from a browser on your laptop or desktop and then resize the browser from biggest to smallest, and watch the content change dynamically.

Nintendo Games Now Available on iOS

Mario Brother for iPad“Nintendo Games Now Available on iOS” is the headline I hope to read someday (apologies if I got your hopes up with that).

Thus far in 2012, Nintendo posted a loss for the first time in company history and continues to struggle as sales of the DS and Wii get obliterated by the ever growing presence of games on mobile devices.  Specifically, iPad and iPhones.  Do a little research on Nintendo’s stance on making their games available on iOS and they are oddly, adamantly opposed to the idea. Why? I don’t know,..it makes absolutely no sense.

Here’s my thought. The library of classic games already exists, and the Nintendo brand is so huge that attracting an immediate audience (& sales) would be no issue.  The games are already created so re-developing them for the iOS platform really shouldn’t be too much of an issue for a handful of well-paid top-tier iOS developers. From there Nintendo could charge something minimal like $5 per copy and possibly overnight, sell millions of copies. Extend this approach to the entire NES classics including Zelda, ExciteBike, Punch Out, etc and they have a brand new revenue stream.

If only I ruled the world.