0

In w3.css there is no option to prepare a form in such a way so that the inputs and labels are appeared on the same line. I am trying but could not fix the problem. Please help to fix the problem.

<div class="w3-row-padding">
  <div class="w3-third">
    <label class="w3-label">User Name</label>
  </div>
  <div class="w3-half">
    <input class="w3-input w3-border" type="text" placeholder="Name">
  </div>

</div>
rns
  • 92
  • 10

1 Answers1

0

This is the code I actually wanted:

<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
<body>

<div class="w3-row-padding">
<div class="w3-quarter">
 <p> <label class="w3-label" type="text">User Name</label><p>
 </div>
 <div class="w3-threequarter">
    <p><input class="w3-input w3-border w3-round" type="text"  
 placeholder="Enter your username"></p>
  </div>
<div class="w3-quarter">
   <p> <label class="w3-label" type="text">Passwords</label></p>
</div>
  <div class="w3-threequarter">
    <p><input class="w3-input w3-border w3-round" type="text" 
 placeholder="Enter your passwords"></p>
  </div>

</div>

</body>

rns
  • 92
  • 10