Tuesday, May 14, 2013

Responsive Web Design

To completely understand Responsive Web Design and appreciate it, let's take a look back at how the Web has evolved over the years.
  • 1991 - First website was published by Tim Berners-Lee 
  • 1996 - Flash was introduced by Macromedia 
  • 1998 - Dynamic design language PHP gained popularity with its PHP3 
  • 2000 - IE 5, first web browser to achieve better than 99% support for CSS1 
  • 2000 - W3C recommended the second release of Javascript, and by 2002, nearly all browsers supported it 
  • 2008 - Mobile access to the internet exceeded desktop access for the first time in history 
  • Today, two thirds of cell phone users say they access the web/email from their device
From the above trend, it is very clear that in future the internet access would be more from smartphones and tablets rather than Desktop PCs.


As we all know the resolution and features offered by the smartphones & tablets vary a lot. So what are the expectations from the future websites?
  1. it should cater to all types of devices ranging from smartphones to PCs
  2. media displayed on website should be viewable on all devices
  3. website should degrade gracefully if the device doesn't support some of the features
So how do we design our websites such that it is viewed optimally in all devices? Here is when "Responsive Web Design" comes to our aid. RWD is a set of design approaches that help in building the websites to have an optimal viewing experience. So what are the basic techniques that can be used to make the website responsive?
  • Adaptive (create multiple templates for each screen size)
  • Flexible (create fluid layout for different screens)
  • Mixed (some content is shown using Adaptive and some are not)
I will elaborate on the techniques in the next blog post.

Wednesday, February 9, 2011

Table with rounded borders (XP Style)

One of my client requirements was to display data on the dash board with a bunch of XP styled tables. I am posting the code so that developers with similar requirements can re-use what I have done.

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="5" background="images/top-left.jpg" width="5" height="29"></td>
    <td height="29" background="images/top-mid.jpg"><div style="color:#FFFFFF">My Title</div></td>
    <td width="5" background="images/top-right.jpg" height="29"></td>
  </tr>
  <tr>
    <td width="5" background="images/left-mid.jpg"></td>
    <td bgcolor="#F7F8FB">
      <div>Content Heading</div>
      <div>Content - 1</div>
      <div>Content - 2</div>
    </td>
    <td width="5" background="images/right-mid.jpg"></td>
  </tr>
  <tr>
    <td width="5" height="5" background="images/bottom-left.jpg"></td>
    <td height="5" background="images/bottom-mid.jpg"></td>
    <td width="5" height="5" background="images/bottom-right.jpg"></td>
  </tr>
</table>

The images used in this example are provided below,



Save the images in a directory named - "images" or modify the image path in HTML code. The final table would look like,

My Title

Content Heading
Content - 1
Content - 2