0
I have to do text and input in one line. Without table tag, even after trying all the methods, it did not work for me. what to
6 ответов
+ 1
Tausif Ansari The problem is that you put a label and an input into separate divs. Just put every such pair into one div one after another, and they will be on one line.
+ 1
two lines is neater.
try this:
https://code.sololearn.com/Wf0VPDrxrYZx/?ref=app
+ 1
even without css, a label tag is inline with the input element, unless you mess it up with divs and br...
<body>
<label for="name">name:</label>
<input id="name"/>
<br><br>
<fieldset>
<legend>Amount:</legend>
<label for="q1">1</label>
<input id="q1" type="radio" name="qty"
value="1" checked>
<label for="q2">2</label>
<input id="q2" type="radio" name="qty"
value="2">
<label for="q3">3</label>
<input id="q3" type="radio" name="qty"
value="3">
</fieldset>
<br>
<fieldset>
<legend>Options:</legend>
<label for="op1">red</label>
<input id="op1" type="checkbox"
name="col" value="red" checked>
<label for="op2">blue</label>
<input id="op2" type="checkbox"
name="col" value="blue">
<label for="op3">green</label>
<input id="op3" type="checkbox"
name="col" value="green">
</fieldset>
<br>
<label for="models">Models:</label>
<select id="models">
<option value="A1">A1</option>
<option value="A2">A2</option>
<option value="A3">A3</option>
</select>
+ 1
To get most of feedback make your example as short as possible, yet showing the problem you are addressing to.
0
Bob_Li You are a great coder but this is not the solution to my problem. But again your code was so good.
Thank you so much for this 🙂
0
Ebrehnn...
Wow your suggestion is too good.
Thanks for this 👍