I want to display like this:
You 're in: ()Europe ()Africa
()Australia ()Asia ()America
What are your hobbies: []Swimming []Cooking []Shopping
[]Sport []Dance []Sing
But now I end up like this:
You 're in: ()Europe ()Africa ()Australia ()Asia ()America
What are your hobbies: []Swimming []Cooking []Shopping []Sport []Dance []Sing
My html:
<div class="container radio-container">
<span>You are in:</span>
<input type="radio" id="europe" name="regions" value="europe">Europe
<input type="radio" id="africa" name="regions" value="africa">Africa
<input type="radio" id="australia" name="regions" value="australia">Australia
<input type="radio" id="asia" name="regions" value="asia">Asia
<input type="radio" id="america" name="regions" value="america">America
</div>
<div class="container checkbox-container">
<span>What are your hobbies:</span>
<input type="checkbox" id="swimming" name="swimming" value="swimming">Swimming
<input type="checkbox" id="cooking" name="cooking" value="cooking">Cooking
<input type="checkbox" id="shopping" name="shopping" value="shopping">Shopping
<input type="checkbox" id="sport" name="sport" value="sport">Sport
<input type="checkbox" id="dance" name="dance" value="dance">Dance
<input type="checkbox" id="sing" name="sing" value="sing">Sing
</div>
Please help!
How do I css checkbox and radio button in a form?
2
Answers
Hi there / you can simply put ()Australia , ()Asia , ()America into a div .because divs with row. the next thing you should do is to add some paddign left and right to the div use this logic on your hobbies too.
label
tag wrapper for your input type checkbox/radio – when the user clicks on text (placeholder) – he clicks on radio/checkbox automatically;I added a
demo-small-width-continer
wrapper for test, you don’t need it in your code.