I have HTML code
<form id="answers">
blue
<input id="0" type="radio">
red
<input id="1" type="radio">
pink
<input id="2" type="radio">
<input type="submit">
</form>
and I want to have each element in the new line. I don't want to use stuff like <br>. In CSS file I tried do this: display: block but nothing's changed.
#answers input {display: block;}
this will make every input in its own line. If you wish to have every input with its label together in a line you should do something like
<form id="answers">
<label>blue <input id="0" type="radio"></label>
<label>red <input id="1" type="radio"></label>
<label>pink <input id="2" type="radio"></label>
<input type="submit">
</form>
css: #answers label {display: block;}
http://jsfiddle.net/barakedry/y6p54vzg/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With