0

How can I make this div stay active after the click?

I tried looking it up but saw nothing that applied to textarea transitions

CSS:

.comment-box:active {
    /* Settings for Transition */
    height:100px;
    /* Transition: Basic */
    transition-duration:0.8s;
    transition-timing-function:ease;
    /* Transition: Chrome+Safari */
    -webkit-transition-duration:0.8s;
    -webkit-transition-timing-function:ease;
    /* Transition: Mozilla */
    -moz-transition-duration:0.8s;
    -moz-transition-timing-function:ease;
    /* Transition: Opera */
    -o-transition-duration:0.8s;
    -o-transition-timing-function:ease;
}

HTML:

<textarea type="text" validation="required" name="comment" placeholder="type a comment here..." maxlength="500" class="comment-box"></textarea>
  • 1
    possible duplicate of [How to keep :active css style after clicking an element](http://stackoverflow.com/questions/7738219/how-to-keep-active-css-style-after-clicking-an-element) – dsgriffin Apr 12 '14 at 21:41
  • thanks for not flagging it, I said that I couldn't find anything that would work for me. also thanks Adrift and @Johansrk for your suggestions, I'll try them out :D – user1643904 Apr 13 '14 at 00:04
  • :visited { css declarations; } – sidhewsar Apr 14 '14 at 16:38

0 Answers0