Styled Radio inputs

Size
1,975 Kb
Views
38,456

How do I make an styled radio inputs?

Http://stackoverflow.com/questions/14622097/radio-button-background-only-with-css. What is a styled radio inputs? How do you make a styled radio inputs? This script and codes were developed by Michael Goldspinner on 07 July 2022, Thursday.

Styled Radio inputs Previews

Styled Radio inputs - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Styled Radio inputs</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="shell"> <form> <ul> <li><label class="label" for="cheetah" style="background-color: white"></label></li> <li><label class="label" for="horse" style="background-color: yellow"></label></li> <li><label class="label" for="lion" style="background-color: green"></label></li> <li><label class="label" for="squirrel" style="background-color: red"></label></li> <li><label class="label" for="tiger" style="background-color: purple"></label></li> <li><label class="label" for="bear" style="background-color: black"></label></li> </ul> <div class="radio-buttons"> <div class="wrapper"> <input type="radio" name="radio" class="radio" id="cheetah" value="" /> <label class="label" for="cheetah" ></label> </div> <div class="wrapper"> <input type="radio" name="radio" class="radio" id="horse" value="" /> <label class="label" for="horse" ></label> </div> <div class="wrapper"> <input type="radio" name="radio" class="radio" id="lion" value="" /> <label class="label" for="lion" ></label> </div> <div class="wrapper"> <input type="radio" name="radio" class="radio" id="squirrel" value="" /> <label class="label" for="squirrel"></label> </div> <div class="wrapper"> <input type="radio" name="radio" class="radio" id="tiger" value="" /> <label class="label" for="tiger"></label> </div> <div class="wrapper"> <input type="radio" name="radio" class="radio" id="bear" value="" /> <label class="label" for="bear" ></label> </div> </div> </form>
</div>
</body>
</html>

Styled Radio inputs - Script Codes CSS Codes

*{ margin: 0; padding: 0; }
.shell { width: 1000px; margin: 0 auto; }
ul { height: 150px; list-style: none; padding-bottom: 50px; }
ul li { float: left; border: 1px solid #666; margin-right: 14px;
}
ul li label { display: block; width: 150px; height: 150px; cursor: pointer;
}
ul label { display: inline;
}
input[type="radio"] { display: none;
}
input[type="radio"]:checked + label.label { border: 1px solid red; background-repeat: no-repeat; display: inline-block; height: 500px; width: 500px;
}
input[type="radio"]:checked + label[for="cheetah"] { background-color: white
}
input[type="radio"]:checked + label[for="horse"] { background-color: yellow
}
input[type="radio"]:checked + label[for="lion"] { background-color: green
}
input[type="radio"]:checked + label[for="squirrel"] { background-color: blue
}
input[type="radio"]:checked + label[for="tiger"] { background-color: purple
}
input[type="radio"]:checked + label[for="bear"] { background-color: black
}
Styled Radio inputs - Script Codes
Styled Radio inputs - Script Codes
Home Page Home
Developer Michael Goldspinner
Username emgo
Uploaded July 07, 2022
Rating 3
Size 1,975 Kb
Views 38,456
Do you need developer help for Styled Radio inputs?

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!

Michael Goldspinner (emgo) Script Codes
Create amazing blog posts 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!