I'm having issues applying flex-box to this CSS toggle-switch extension: https://ghinda.net/css-toggle-switch/index.html
I downloaded it as a CDN, so I don't have its CSS files on me
Here is my sample index.html code:
<div class="settings">
<p>Settings</p>
<label class="switch-light switch-ios" onclick="">
<input type="checkbox">
<strong>
Send Email Notifications
</strong>
<span class="switch-light-span">
<span>Off</span>
<span>On</span>
<a></a>
</span>
</label>
<label class="switch-light switch-ios" onclick="">
<input type="checkbox">
<strong>
Set Profile to Public
</strong>
<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>
</label>
<select name="timezone">
<option value="volvo" selected>Select a Timezone</option>
<option value="volvo">Volvo</option>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
<div class="buttons">
<button>Save</button>
<button>Cancel</button>
</div>
</div>
</div>
Here is a sample CSS code:
/* SETTINGS */
.settings {
display: flex;
flex-direction: column;
}
.switch-light {
display: flex !important;
justify-content: space-between !important;
}
Apparently you have to apply the !important keyword if you're using a CDN to override their style sheets. So that's what I did, but I'm not getting the desired effect I want.
I was trying to apply a property to the span element, which is that entire button, but it is not working.
Here is an example of what I would like to achieve:
Any suggestions?