how to use CSS to make label labels equal width. <div><label> password </label><input type= "password"/></div>
<div><label> Confirm password </label><input type= "password"/></div>
How to align it. The method of adding space is not good oh. (because the number of words in the label is not the same, so the page display effect is not aligned) the cause of the problem and the solution:
The label defaults to an inline element with no line breaks before and after the element, and no width can be set.
If you want to set the width for the label, you need to change the display property of the label to a block-level element.
The method is as follows:
1. Add Inline-block property value, change label label into inline block element (css2.1 Add)
{Display:inline-block;}
2. Increase the Width property, such as setting the breadth to 100px
Label{width:100px;display:inline-block;}
3. All label labels on the page will become 100px when added