• Once the button is clicked I want it to stay with the active style instead of going back to normal style. Can this be done with CSS please? Im using blurb button from DIVI Theme (WordPress). Please help me!

    code in Divi theme Options:

    #blurb-hover.et_pb_blurb .et_pb_blurb_content
    .et_pb_main_blurb_image .et-pb-icon:hover {
           color: red !important; }
    
    #blurb-hover.et_pb_blurb .et_pb_blurb_content
    .et_pb_main_blurb_image .et-pb-icon:selected {
      background-color: #ff4b46;
      color: #fff; }
    
    #blurb-hover.et_pb_blurb .et_pb_blurb_content
    .et_pb_main_blurb_image .et-pb-icon:active {
        color: white !important;
       background-color: red;
        width: 140px;
        height: 100px; }

    Then, I try to put this functionally code in wordpress.. but when i click, the icon/image on my web, it does not keep selected. What is wrong? code: jsfiddle.net/La8wQ/660

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to keep :active css style after click a button’ is closed to new replies.