skip to content
Advertise here

CSS3 - Almost a good idea but for Safari and Chrome of all browsers.

31st January 2010

Updated 24th February 2011 - Now working in Safari and Chrome





©2010 stu nicholls - cssplay.co.uk


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

I am posting this menu to see if anyone has seen this problem or knows of a workaround.

The idea is to have a current page indication that will be removed when hovering other menu links.

For this to work I have set up the current page indication as the last list item in the unordered list and placed it using absolute positioning behind the current page link.

Then using the 'general sibling selecter' ~ (tilde) I can move this to its new position when hovering over other menu links using the style:
.menu li.p3:hover ~ li.slide {left:220px;} etc

Well that was the theory and it works in Firefox, Opera and even IE8. BUT not in Safari or Google Chrome which doesn't appear to allow you to use :hover with ~

If anyone has a workaround or any information on this then please let me know.

24th February 2011

There is now a workaround to this problem in Safari and Chrome by adding a CSS webkit animation to the html that does nothing but 'activates' the :hover tilde styling.

I have also added slide animation for Safari, Chrome, Opera and Firefox v4 beta




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