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.
10th March 2015 - Does not work on the latest version of Opera.
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.