Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Css3 hide elements and appear on click

Css3 hide <li> elements and appear on <li> click

Problem

http://jsfiddle.net/EUFrH/

I'm looking to Hide the "subline" line from the list and when the "sub" line is clicked it pushes the other lines down to reveal the "subline" li.

Just looking for a way to do it without having to use Js or Jquery

Thanks in advance!

Problem courtesy of: Dan Gamble

Solution

You could try to make this using the or . The technique is described, for example, here: http://www.inserthtml.com/2012/04/css-click-states/

Unfortunately, there seems no way to do that with your current markup. It is possible to modify the HTML this way:

    • ... content omitted ...
  • Demo is here: http://jsfiddle.net/EUFrH/3/

    Solution courtesy of: Dmitry

    Discussion

    View additional discussion.



    This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

    Share the post

    Css3 hide elements and appear on click

    ×

    Subscribe to Css3 Recipes - The Solution To All Your Style Problems

    Get updates delivered right to your inbox!

    Thank you for your subscription

    ×