The following css is to have the $ sign appear on either side of the Click text within <label></label>. However, I'd also like to make the $ content move left and right respectively on hover using only css. I'm not entirely sure how I can accomplish that since the $ is a pseudo element
#foo:hover ~ label {
cursor: pointer;
background-color: #e0e0e0;
background-image: linear-gradient(180deg, #e0e0e0 0%, #B7B7B7 50%, #B7B7B7 100%);
}
label::before, label::after {
content: "$";
}
<div class="button">
<input id="foo" type="checkbox" />
<label for="foo">Click</label>
</div>