How to style the tick mark checkbox using css without using images?

Tags: html,css,css3,checkbox

Problem :

Is there any way to style the tick mark checkbox only by using HTML and CSS3 without using images, like in Google's signin page?

Solution :

You can accomplish this by using a combination of HTML, CSS and jQuery. See the code I whipped up here to create a checkbox from an <a> tag and style it with CSS.

I've tested this code and it works beautifully in Chrome, FF, & IE 7-10. Haven't tested Safari or Opera...

Just make sure you nest your <a> checkbox tag in <form> tags, give it an ID, a class of "checkbox", and hashtag HREF. In essence:

    <form action="#" method="get">

    <a class="checkbox" id="myCheckbox" href="#"></a>


    <a class="checkbox checked" id="myCheckbox" href="#"></a>


Let me know how that goes for you.

    CSS Howto..

    express: how to send html together with css using sendFile?

    How to set CSS of one element depending on another element having a specific class?

    Javascript/CSS slideshow: Using transparencies highlights flaws I don't know how to fix

    How to display print preview as same as the webpage using css?

    CSS: How to Solve this “Site-Is-Too-Big” Challenge?

    CSS help - how to keep my div in place with a responsive design

    Basic Accordion pull down using java script and css not working. How can I get it to not have a symbol beside it?

    How to create menu of overlayed divs?

    How to set content area div height with dynamic header div

    How to avoid gaps using Isotope with Masonry layout sortby random

    How to select text under multiple “div-li-a href” using css in selenium web driver

    CSS: How to toggle switch action on the link?

    How to fit img into div circle ?

    background image also header image cc trick how to do it? [closed]

    How to get tr:nth-child which has css applied

    How to create a progress dialog when switching the webpages?

    How to style a subset of some text in HTML/CSS?

    JavaScript, AngularJS: How do I know if element is larger than its container?

    How to combine grouped inputs with aligned forms?

    How to change the color of the active link in the menu

    How can CSS translate elements away from one point?

    How to make all elements in one line?

    how to remove xlink default styling

    How to improve the performance of this CSS animation?

    How would you vertically justify text with css/Javascript?

    How can I replace the text in an

    from a CSS file without using a tag?

    CSS show div background image on top of other contained elements [duplicate]

    How to achieve a CSS footer “curtain” effect?

    How to use the .css function with jQuery

    How to call particular CSS file only for desktop not for mobile [closed]