Im trying to figure out how to remove bullets from Django's MultipleChoiceField
. So far I have tried this very popular solution by changing my css file that basically states to input this code in my css file
ul {
list-style-type: none;
}
This didnt work and I also tried:
li {
list-style-type: none;
}
This also didnt work. Is there something Django specific why the list keeps on showing up with bulletpoints? I also tried adding the style in my forms class but also without success
class SearchForm(forms.Form):
job_industry = forms.MultipleChoiceField(
widget=forms.CheckboxSelectMultiple(attrs={'class': 'form-check', 'style': 'list-style:none;'}),
choices=industry,
)
I noticed that whatever attrs I enter to the forms.CheckboxSelectMultiple
it only gets passed to the <label>
tag and not the <ul>
or <li>
tag of the list. Im using Bootstrap5 if that makes any difference.
How to delete bulletpoints from Django forms.MultipleChoiceField
?