skip to content
Advertise here

For Opera, Netscape and Mozilla ONLY - Sliding Doors II

7th 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

Whilst looking at A List Apart's Sliding Doors of CSS, Part II I had an idea how to remove all styling of background images from the list item and use just the link to hold BOTH background images, and all with no extra markup.

The idea was to use the :first-letter pseudo element to hold the left fixed image and the link itself to hold the right sliding image.

The :first-letter pseudo element can be styled with 'background', 'padding', 'margin' and 'border' and is supported by IE5, IE6, IE7, Opera, Firefox, Mozilla, Netscape etc. so in theory it can be used to hold and position the fixed background image.

But theory is far from fact and the only browsers to get the styling right are Opera, Netscape and Mozilla. So here it is for all you Opera, Netscape and Mozilla users, sliding doors with both the background images in the link and NO extra markup.

Perhaps Firefox can have a look at their implementation and copy the three working browsers with their next release. They almost make it, but fail to get the padding right. IE5, IE6 and even IE7 fail miserably with this and cannot handle the negative margin or the padding, IE even fails on the :hover for some unknown reason.

Oh well back to the drawing board.




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