• melanie patterson

    (@thosethingstheysaid)


    Hello!

    I’m trying to style my GDPR acceptance checkbox similarly to my radio buttons. Because they’re not just a checkbox, the classes and pseudo-classes don’t appear to be the same so the code won’t quite work.

    Here is what I have more my radio buttons, and have also tried subbing out every instance of radio for checkbox without success. Any tips for this? Right now my default checkbox is way off screen so I can create the new checkbox from scratch.

    
    .wpcf7 input[type="radio"] {
      position: absolute !important;
      left: -9999px !important;
    }
     
    .wpcf7-radio span.wpcf7-list-item-label {
      position: relative;
      padding-left: 20px;
    }
     
    .wpcf7-radio span.wpcf7-list-item-label:before  {
      content: '';
      background: #ffffff;
      width: 15px;
      height:15px;
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      border-radius: 100%;
      border: 4px solid #ffffff;
    	margin-top: -1px;
    }
     
    .wpcf7 input[type=radio]:not(old):checked + span:before {
      background: #f0b49e;
    }
    

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Style GDPR Acceptance Checkbox’ is closed to new replies.