vendredi 3 novembre 2017

CSS aslin two divs next to each other

I have looked at all the other questions on the same topic but none seem to be working. Consider the code-

.River {
height: 100px;
width: 100%;
margin-top: 30px;
background-color: #00BFFF
}
.switch {
position: relative;
width: 60px;
height: 34px;
float: left;
text-align: center;


}

and the html code is below

<div class="River">
<p>River</p>
<div>


<label class="switch">
<input type="checkbox">
<span class="slider round"></span>
</label>

I am trying to position the switch directly in front of the River label. This would look something like

RIVER - 'SWITCH'

Any ideas on how I can achieve this




Aucun commentaire:

Enregistrer un commentaire