Mobile Friendly Website

CSSPLAY

Doing it with style

CSS DEMOS'cssplayBox' - THE CSS only LightBox

Date : 12th April 2011

For all modern browsers


Green lizard

The photograph description can go here.

Beetle on a daisy

The photograph description can go here.

Misty landscape

The photograph description can go here.

Bird of prey

The photograph description can go here.

Barbed wire perch

The photograph description can go here.

Isn't he cute!

The photograph description can go here.

Follow my leader

The photograph description can go here.

Dragonfly

The photograph description can go here.

Grasshopper

The photograph description can go here.



Information

The main problem with the previous versions of the css only lightboxes was the use of :target to action the popup lightbox image and information. If the lightbox is used several times and the the browser back button is clicked, you will end up working backwards through the lightbox images before you can reach the previous page.

In this version I have rectified this and use the adjacent sibling selector to popup the lightbox, which then allows you to use the back button without any problem.

I have also used image 'fade in' and information 'slide down' panels which will be seen in Firefox 4, Safari, Chrome and Opera.

The lightbox image will be both vertically and horizontally centered in the browser window and will stay that way when resizing the browser. The 'close' icon will always be visible at the top right of the image and when the width of the browser is too narrow for the large image it will resize to fit (in all but IE7).

This demo has come a long way since my early attempts and I think, that with the latest css animations and methods, this lightbox rivals those of jQuery/javascript.


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}cssplay.co.uk 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.

Support CSSPLAY

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.


For more CSS demonstrations
I recommend that you visit the Dynamic Drive CSS Library.


Free, practical CSS menus, layouts, and examples


CUSTOM SEARCH

Facebook Twitter rss feed Facebook Fan Page