Below is the Screenshot of my lightning-checkbox-group. Instead of showing them vertically I want them aligned horizontally. I have referred several links and applied many CSS but still no luck. Can someone please help me with this. Also I want the background color and border color of the checkboxes to be changed?
.html
<div class="slds-align_absolute-center">
<div class="slds-m-bottom_x-large slds-theme_default slds-form-element__control green-checkbox">
<lightning-checkbox-group class="green-checkbox" options={objectFieldOptions} value={selectedObjectFieldValue}
onchange={objectFieldHandleChange} required="true">
</lightning-checkbox-group>
</div>
</div>
For Bg color and border color change I tried this CSS but it's not working
.CSS
.THIS input[type=checkbox]:checked.green-checkbox{
border-color: #00b200;
box-shadow: 0 0 3px #006A00;
background-color: rgb(0, 178, 0);
border:1px solid;
}
.THIS .slds-checkbox {
display: inline !important;
}
display: inline !important;
but your code doesn't show it. Have you actually tried it?lightning-checkbox-group
inherits the class?