skip to content
Advertise here

100% clickable Sliding doors

6th January 2007

CSS play Support


CSS play Recommend

Free, practical CSS menus, layouts, and examples

Follow CSS play

Facebook  Twitter  Facebook Fan Page



Just CSS | Designs for the future

Like the CSS Zen Garden?
Then why not visit Just CSS and see it you can design for the future.




Information

This menu is based entirely on A List Apart's Sliding Doors of CSS, Part II.

I have always thought that the 'sliding doors' menu has one very small flaw in that there is always a 9 pixel 'dead space' on the left of each tab that is not clickable, this being due to the positioning of the link over the tab to give the sliding doors effect with the link holding the sliding background image and the list holding the fixed left hand edge. Although it is possible to get rid of this space by adding an extra span, I always thought that it would be nice to be able to click the whole tab without any extra markup.

Now, with a little 'lateral' thinking, I have swapped the background images so that the link holds the left hand fixed image and the list holds the sliding image.

So with no extra markup and just a small change to the stylesheet, the above demonstration shows that the whole of each tab is now clickable.

The method makes use of relative positioning and negative/positive margins for both the list item and its link. This has been tested in IE5.x, IE6, IE7, Firefox and Opera but I see no reason why it should not be ok in all the main browsers.

Of course the credit for the original idea is entirely down to A List Apart.

Please note that this is based on the 'A List Apart' sliding doors and the :hover state does not work in IE5.x or IE6. There is a workaround to this on the ALA website but it does require extra markup.




Copyright

You may use this method on your personal 'non-profit' web site without seeking my permission. A link back to CSSplay is always appreciated.

Commercial usage is also permitted without seeking approval, but I would ask that a donation is considered to support my work on CSSPlay.

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.




  • Each week the Creare Group produce video tutorials for SEO and tips and tricks for the web design industry.
  • We offer nothing but the highest quality SEO, Social Media Optimisation And PPC services to businesses in London

 

CSS play Testimonial

"The citroen.co.uk web site uses
CSS play code for the site drop down menus.
This code works seamlessly in IE 6 & 7, and is an excellent solution to the Creative requirements of the site."

Damon Clark - Brandwidth