Reputation: 161
Current code:
<div className = 'terms'>
<IonCheckbox/>
<span> paragraph </span>
</div>
CSS:
.terms {
margin-top: 10vw;
font-style: italic;
ion-checkbox {
margin-right: 2vw;
}
}
I need the paragraph to be a left aligned block. Instead it just wraps around the checkbox. I've tried using a variety of of things like float: left on the check-box, display: block
Upvotes: 1
Views: 308
Reputation: 161
ion-checkbox {
vertical-align: top;
margin-right: 5px;
}
span {
display: inline-block;
width: 80%;
font-style: italic;
color: grey;
}
Upvotes: 0
Reputation: 76
Use slot option in IonCheckbox
<IonItem>
<IonLabel ><i>paragraph </i></IonLabel>
<IonCheckbox slot="start" />
</IonItem>
Upvotes: 2
Reputation: 157
I think you use flexbox;
display: flex;
justify-content: flex-start;
flex-direction: row;
Upvotes: 0
Reputation: 5428
The easy way is to stick everything into a flexbox. I don't have ionic here but it should work fine. Wrap the checkbox with a div if necessary.
<div className = 'terms' style="display:flex">
<div><input type="checkbox"></div>
<span> paragraph </span>
</div>
Upvotes: 0