Responsive design is making the page layout adaptable to mobile devices. There are many ways to make a layout responsive. Twitter bootstrap is one way to make it happen. I prefer simple media queries. This article highlights one such example.

At the bottom of every content site, there are several links. The links are unordered lists (ul tags) in HTML. But they appear in tabular format. For example, the bottom of a site is shown below.

The HTML markup for the above grid is quite trivial.

The unordered list has the style, list-unstyled. This will remove the bullet point for the list item (list-style-type: none). The styling of the list item is important. The list item has a class of col-home.

The list item is floated to the left and is center-aligned. It has a width of 25%. This ensures that there are four columns.

To make the list responsive, use media queries. The list item needs a minimum width of 200 pixels. With that in mind, the following media query is written.

More than 800 pixels width, there are four columns. When the width is between 600 and 800 pixels, there are three columns. When the width is between 400 and 600 pixels, there are two columns. Below 400 pixels width, there is a single column.

Responsive list of items shown in tabular format
Tagged on: