html - Using different images for checkboxes in CSS -


i have seen questions asking how replace checkbox image have been answered, having separate issue. trying make form multiple check boxes, each different image used button user. every time try have 2 different images, 1 won't show, , 1 button work. appreciated!

here's code:

     .services_form input[type="checkbox"]{  	    display:none;       }           .services_form input[type=checkbox]:checked + label       {  	      background-color: #bdc3c7;  	      background-size: 100%;  	      height: 250px;  	      width: 250px;            opacity: 0.5;  	      display:inline-block;  	      padding: 0 0 0 0px;       }           .services_form input[type=checkbox] + label       {  	      background-size: 100%;  	      height: 250px;  	      width: 250px;  	      display:block;  	      float: left;  	      padding: 0 0 0 0px;  	      cursor: pointer;       }        #accombutton{  	     background: url("button1.png") no-repeat;      }        #foobar{           background-image: url("button2.png");      }        .button {  	     float: left;  	     width: 35%;  	     height: 35%;  	     border-radius: 15%;  	     margin: 5% 5% 5% 5%;      }
    <form class="services_form">          <div class="accombutton">          <input type="checkbox" id="accombutton"></input>          <label for="accombutton" id="accomlabel"></label>          </div>          <div class="button">          <input type="checkbox" id="foo"></input>          <label for"foo" id="foobar"></label>          </div>      </form>

you need use background: url("button1.png") no-repeat; not in #accombutton in #accomlabel #foobar.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -