How do achieve the following:
┌────────────────────parent────────────────────┐ │ label [text-box ] [button] │ │ paragraph │ └──────────────────────────────────────────────┘
label
button
text-box
paragraph
Both label and button should obey font properties defined elsewhere as maximum as possible. parent is center-aligned within window, and, naturally, can have arbitrary width.
parent
Please advise.
Updated [Oct 2016]: Flexbox version...
form { display: flex; } form input[type="text"] { flex: 1; }
<form> <label>Name</label> <input type="text" /> <button>Submit</button> </form> <p>Lorem ipsum...</p>
1.4m articles
1.4m replys
5 comments
57.0k users