I view quiz Moodle using WS(Webservice) but not using js and css from moodle. i cannot change code but can using css. Please help me, how to make CSS to prevent newline after radio button?
<div >
<div >
<input type="radio" name="q21:2_answer" value="0" id="q21:2_answer0" aria-labelledby="q21:2_answer0_label">
<div id="q21:2_answer0_label" data-region="answer-label">
<span >a. </span>
<div >
<p>></p>
</div>
</div>
</div>
</div>
CodePudding user response:
You can use label
instead of div
it will fix your issue
<div >
<div >
<input type="radio" name="q21:2_answer" value="0" id="q21:2_answer0" aria-labelledby="q21:2_answer0_label">
<label id="q21:2_answer0_label" data-region="answer-label">
<span >a. ></span>
</label>
</div>
</div>
References:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio https://getbootstrap.com/docs/5.0/forms/checks-radios/#radios
CodePudding user response:
Try this.
<style>
.w-auto {display:contents;}
</style>
<div >
<div >
<input type="radio" name="q21:2_answer" value="0" id="q21:2_answer0" aria-labelledby="q21:2_answer0_label">
<div id="q21:2_answer0_label" data-region="answer-label">
<span >a. ></span>
</div>
</div>
</div>