Grow your CSS skills. Land your dream job.

input:checked ~ .lala selector

  • # December 15, 2012 at 4:45 pm

    Hello,

    i recently run ino a porblem, and i really hope there is a way to solve it without using jquery.

    http://atiweb.org/others/atiwebMobile/

    the basic imagination would be, if you click the lablel then it would slidedown the hidden content.

    exactly like here: http://atiweb.org/others/bkl/
    if you click the ‘+’ in the right top corner of the site.

    please tell me this can be done in css :X

    cause this is not the right selector: http://www.w3schools.com/cssref/sel_gen_sibling.asp

    ~ attila

    # December 15, 2012 at 5:59 pm

    > i really hope there is a way to solve it without using jquery.

    Why…that’s what it’s for?

    # December 15, 2012 at 10:02 pm

    It can. You say input:checked + p {…}
    Use css3 transition. p height 0. Input:checked + p height 200px.

    # December 16, 2012 at 11:45 am

    Instead of a height parameter, probably display: none; / display: block; would be best.

    @attilaegyed – Why not use JQuery though?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".