Simple CSS Checkboxes with Font Awesome

Developer
Size
1,848 Kb
Views
32,384

How do I make an simple css checkboxes with font awesome?

Custom CSS checkboxes using the Font Awesome icon font. What is a simple css checkboxes with font awesome? How do you make a simple css checkboxes with font awesome? This script and codes were developed by James Barnett on 11 August 2022, Thursday.

Simple CSS Checkboxes with Font Awesome Previews

Simple CSS Checkboxes with Font Awesome - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple CSS Checkboxes with Font Awesome</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Custom Checkboxes</h1>
<div> <input id="box1" type="checkbox" /> <label for="box1">Checkbox 1</label> <input id="box2" type="checkbox" /> <label for="box2">Checkbox 2</label> <input id="box3" type="checkbox" /> <label for="box3">Checkbox 3</label>
</div>
</body>
</html>

Simple CSS Checkboxes with Font Awesome - Script Codes CSS Codes

@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
/*** basic styles ***/
body { margin: 30px; }
h1 { font-size: 1.5em; }
label { font-size: 24px; }
div { width: 175px; margin-left: 20px;
}
/*** custom checkboxes ***/
input[type=checkbox] { display:none; } /* to hide the checkbox itself */
input[type=checkbox] + label:before { font-family: FontAwesome; display: inline-block;
}
input[type=checkbox] + label:before { content: "\f096"; } /* unchecked icon */
input[type=checkbox] + label:before { letter-spacing: 10px; } /* space between checkbox and label */
input[type=checkbox]:checked + label:before { content: "\f046"; } /* checked icon */
input[type=checkbox]:checked + label:before { letter-spacing: 5px; } /* allow space for check mark */
Simple CSS Checkboxes with Font Awesome - Script Codes
Simple CSS Checkboxes with Font Awesome - Script Codes
Home Page Home
Developer James Barnett
Username jamesbarnett
Uploaded August 11, 2022
Rating 4.5
Size 1,848 Kb
Views 32,384
Do you need developer help for Simple CSS Checkboxes with Font Awesome?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

James Barnett (jamesbarnett) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!