# Conflicting CSS styles for checkbox elements

**URL:** <https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419>\
**Category:** Issues\
**Created:** [November 3, 2020, 10:26am UTC](https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419 "2020-11-03T10:26:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreas.gasser.novartis.com](https://community.datagrok.ai/letter_avatar_proxy/v4/letter/a/e5b9ba/32.png) [@andreas.gasser.novartis.com](https://community.datagrok.ai/u/andreas.gasser.novartis.com)\
**Post date:** [November 3, 2020, 10:26am UTC](https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419/1 "2020-11-03T10:26:34Z")

</div>

We were running in strange issues with the updated CSS in our DG environment. Following CSS lines are conflicting with custom styled “checkbox” items. Can you explain us the reason for the CSS lines or can it be removed from the core?  
(Of course we could override these styles somehow but just wanted to go the cleaner path…)

```css
body:not(.selenium) input[type="checkbox"] {
    width: 0;
    margin-right: 16px;
}

```

---

<div class="post-metadata">

**Author:** ![alex.paramonov](https://community.datagrok.ai/user_avatar/community.datagrok.ai/alex.paramonov/32/9_2.png) [@alex.paramonov](https://community.datagrok.ai/u/alex.paramonov)\
**Post date:** [November 3, 2020, 3:55pm UTC](https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419/2 "2020-11-03T15:55:51Z")

</div>

Hmm, yes, I agree, it’s very wide.  
This is our code to reset checkboxes customization for testing DG with Selenium.  
Can you provide your checkboxes css, so I could make something more friendly?

---

<div class="post-metadata">

**Author:** ![andreas.gasser.novartis.com](https://community.datagrok.ai/letter_avatar_proxy/v4/letter/a/e5b9ba/32.png) [@andreas.gasser.novartis.com](https://community.datagrok.ai/u/andreas.gasser.novartis.com)\
**Post date:** [November 3, 2020, 4:21pm UTC](https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419/3 "2020-11-03T16:21:47Z")

</div>

We use this component for now (link: [https://material-ui.com/components/switches/](https://material-ui.com/components/switches/)) but your CSS code is very wide defined so almost any input with `input="checkbox` is modified right now. Not sure if that is healthy…

---

<div class="post-metadata">

**Author:** ![alex.paramonov](https://community.datagrok.ai/user_avatar/community.datagrok.ai/alex.paramonov/32/9_2.png) [@alex.paramonov](https://community.datagrok.ai/u/alex.paramonov)\
**Post date:** [November 3, 2020, 4:24pm UTC](https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419/4 "2020-11-03T16:24:54Z")

</div>

I agree here. Will try to figure out how to do it better.

---

<div class="post-metadata">

**Author:** ![alex.paramonov](https://community.datagrok.ai/user_avatar/community.datagrok.ai/alex.paramonov/32/9_2.png) [@alex.paramonov](https://community.datagrok.ai/u/alex.paramonov)\
**Post date:** [November 4, 2020, 8:08pm UTC](https://community.datagrok.ai/t/conflicting-css-styles-for-checkbox-elements/419/5 "2020-11-04T20:08:08Z")

</div>

Done, now checkboxes have special selector.
