Home > database >  Vertically align two labels and inputs in a div
Vertically align two labels and inputs in a div

Time:01-03

I have a div with two labels, and two inputs, and I need two vertically align them without making two divs. I want to vertically align the inputs and labels in css so that they are on top of each other.


First Name:
        <label for="Lname">Last Name:</label>
        <input type="text" name="Lname" id="Lname" placeholder="Last Name" maxlength="20" required>
    </div>

I have tried vertical-align in css but that did not work. can you help?

CodePudding user response:

You can use enter image description here

  •  Tags:  
  • css
  • Related