I am currently customizing the appearance of a checkbox. The HTML code in the file called fin1.cfm is as follows:
<td>Master Event:</td>
<td>
<input type = "checkbox" id = "cb_e" name = "datesumm" value = "" >
<label for = "cb_e"> </label>
</td>
The CSS code in the betty.css file looks like this:
label {
display: inline-block;
cursor: pointer;
position: relative;
padding-left: 25px;
padding-top: 15px;
margin-right: 0px;
font-size: 13px;
}
input[type=checkbox] {
display: none;
}
label:before {
content: "";
display: inline-block;
width: 30px;
height: 20px;
margin-right: 0px;
position: absolute;
left: 10;
bottom: 1px;
background-color: #E6F2F0;
box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8);
border-radius: 10px 10px 10px 10px;
}
input[type=checkbox]:checked + label:before {
content: "D";
text-shadow: 1px 1px 1px rgba(0, 0, 0, .2);
font-size: 15px; input[type=checkbox]:checked + label:before
color: red;
text-align: center;
line-height: 15px;
padding-top: 7px;
}
The issue I am facing pertains to the content property within the
input[type=checkbox]:checked + label:before
selector.
There are instances where I need the content to be "D" as shown, but there are also other situations where I require different content, such as a check mark.
I have attempted various solutions like moving the statement to a separate CSS file or defining a class for it and applying that to the HTML label tag, but so far I haven't achieved the desired outcome.
If anyone could provide guidance on how to display different content in distinct locations, I would greatly appreciate it.