How to replace a checkbox with an image

Posted by admin on Thu, 04/20/2017 - 09:51

A short note how to replace your checkbox with an image.

<div class="mycheckbox">
    <input type="checkbox" name="useful" id="useful" />
    <label for="useful">It is useful?</label>
</div>
.mycheckbox input[type="checkbox"] {
  display: none;
}
.mycheckbox input[type="checkbox"]+label {
   background: url('images/checkbox-off.png') no-repeat;
  width:20px;
  height: 20px;
}
.mycheckbox input[type="checkbox"]:checked + label {
  background: url('images/checkbox-on.png');
  width: 20px;
  height: 20px;
}
Tags: 
×

Hey! Don't miss a new cool stuff!

Comments

Anonymous (not verified)

Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a bit, but other than that, this is great blog... Webdesign

Anonymous (not verified)

I don’t have the time at the moment to fully read your site but I have bookmarked it and also add your RSS feeds. I will be back in a day or two. thanks for a great site. Zonnepanelen

Anonymous (not verified)

I must say that overall I am really impressed with this blog. It is easy to see that you are passionate about your writing. If only I had your writing ability I look forward to more updates and will be returning. Zonnepanelen installateur

Anonymous (not verified)

I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the excellent work. Zonnepanelen

Anonymous (not verified)

That's what makes you the best. You should keep publishing more articles and you will Such Become One of the best writers ever Warmtepompen

Anonymous (not verified)

A very nice and good post this. I really like it very much. Keep this quality of your work on articles going on and please do not let the quality of your articles fall to bad. Cheers! Warmtepomp

Anonymous (not verified)

Once I thought about things like: why such information is for free here? Because when you write a book then at least on selling a book you get a percentage. Thank you and good luck on informing people more about it Webdesign

Anonymous (not verified)

I'm going to read this. I'll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article Webdesign

Anonymous (not verified)

That's what makes you the best. You should keep publishing more articles and you will Such Become One of the best writers ever Webdesign

Anonymous (not verified)

That's what makes you the best. You should keep publishing more articles and you will Such Become One of the best writers ever Webdesigner

Gabriel (not verified)

I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing.
newt scamander coat

jakdown (not verified)

This blog contains so many interesting stuff that makes me want to visit again and again. Look forward for more interesting updates.. Coda

Asad ali (not verified)

Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.
https://zartash.pk

Anonymous (not verified)

Thanks for ones marvelous posting! I genuinely enjoyed reading it, you are a great author. I will be sure to bookmark your blog and may come back very soon. I want to encourage you to definitely continue your great job, have a nice weekend. Blood oxygen level

frank (not verified)

I ‘d mention that most of us visitors are really endowed to exist in a fabulous place with very many wonderful individuals with very helpful things. Cheap flights

Anonymous (not verified)

I have browsed most of your posts. This post is probably where I got the most useful information for my research You are my sunshine song

Anonymous (not verified)

Really impressed! Everything is very open and very clear clarification of issues. It contains truly facts. Your website is very valuable. Thanks for sharing. It's late finding this act. At least, it's a thing to be familiar with that there are such events exist. I agree with your Blog and I will be back to inspect it more in the future so please keep up your act. Hub po

Anonymous (not verified)

Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign! What does a mucus plug look like

Asad ali (not verified)

Wow i can say that this is another great article as expected of this blog.Bookmarked this site..
stream TV

fezan (not verified)
Imlaak (not verified)

Its like you read my psyche! You appear to know such a great amount about this, similar to you composed the book in it or something. I imagine that you could do with certain pics to drive the message home a bit, yet other than that, this is extraordinary blog imlaak so you check specific blog to gain your information.

kitaab (not verified)

I get something harder on changed zones standard. It will absolutely simperingly be abandoning to take in web content from different makers what's more practice a little from their page. I saw that you talk around a basic article. kitaab I portray a couple of central information about your related blog. You locate any sort of result or use for study reason.

Custom Motorcyc... (not verified)

An fascinating discussion may be valued at comment. I do believe that you simply write read more about this post.it might not often be a taboo subject but normally persons are too few to dicuss on such topics. To a higher.Custom Motorcycle jackets

angelina (not verified)

If you want to take the first position in math subject then math tuition singapore will provide you those qualities, if you follow their steps then you can take the first position.

richman (not verified)

I get something harder on changed zones standard. It will totally simperingly be forsaking to take in web content from various creators what's more practice a little from their page. prizebondlucky

vucutguzellik (not verified)

I saw that you talk around a crucial article. I depict a few focal data about your related blog. In your article you talk about change checkbox with a picture. https://www.vucutguzellik.com/ Here I talk about my site that give decorating operators things, give an endeavour.

arabic tv channels (not verified)

I saw that you talk around a significant article. I portray a couple of central information about your related blog. In your article, you talk about change checkbox with an image. Here I talk about my site arabic tv channels that gives brightening administrators things, give an undertaking

fairviewaccountants (not verified)

Your blog shares an article or image about the short note of replacing your checkbox, you giving a noteworthy getting some answers concerning this article. www.fairviewaccountants.com So here I give obliging information about anything that is connected with accounting. Which gain heaps of data about related blog.

noorglassworks (not verified)

Its like you read my brain. You appear to know such a great amount about this, similar to you composed the book in it or something. I feel that you could do with certain pics to drive the message home a bit, however other than that, this is incredible blog. freeseosolutions.com

www.e-islamichub.com (not verified)

Your work and assurance are promising. Also, I anticipate that you should continue posting this sort of article.
e-islamichub Furthermore, in the event that you need to look through this sort of different point about the pertinence of this article. At that point, you should visit our site to continue perusing this sort of article and helpful learning.

hamzakhan17826 (not verified)

Your work and promise are likely. Also, I assume that you should proceed to post this sort of substance. air cargo to pakistan

Alex (not verified)

I tried this method and it worked, thanks mate for proving the code, I was trying to change my website https://www.digital-marketing-library.com/ checkbox to image, and your method worked for me.

Jones (not verified)

I should state that general I am truly awed with this blog. It is easy to see that you are enthusiastic about your composition. I am just following your composition style for https://www.whatsappsociety.com/ to make more useful content.

Asad ali (not verified)

This blog is so nice to me. I will keep on coming here again and again. Visit my link as well..
voyance par telephone gratuit

Asad ali (not verified)

I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks!
https://naijaschool.com.ng/uniabuja-post-utme-de-screening-form/

Captain Marvel ... (not verified)

Thanks for sharing us yours precious time to create this post, its so informative and the content make post more interesting. really appreciated. Captain Marvel Jacket

Add new comment