Mobile Friendly Website


Doing it with style

CSS DEMOSGrid Accordion

Date : 17th November 2011

For all modern browsers

This demo is too wide for your mobile screen.
Please view on a tablet or PC.


Click any of the above 'thumbnail' images to expand them to full size. Once expanded then the large image will stay visible even if clicking elsewhere on the page. Click the 'RESET' button to return the grid to its initial position.

IE9 will see an instant jump in the size of the images, but all other browsers will see these animate to their new sizes. Hopefully IE10 will also see the animation when it is finally released.

This uses :target with the general sibling selector and there is no jump to the top of the browser window when clicking the thumbnails. This is achieved by setting the :target elements to display:none; so that the browser has no reference to jump to the top of the browser window.

27th June 2012 - recoded and restyled to remove the need for :target and the problems with the browser 'back' button. Now you can use the left/right arrows to cycle through the images in browsers that support this feature.

Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.

  1. If you are using this on a personal web site then please retain the copyright comment in the stylesheet.
    A support donation is now required for this demonstration.
  2. If you are using this on a commercial web site, or as a paying job for a client, then please email me asking for permission - stu{at} and again a support donation is required.
  3. If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.


Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.


Facebook Twitter rss feed Facebook Fan Page