How to get the label ,textbox,dropdown ,radio button in the same line in the asp.net using css
Loading
How to get the label ,textbox,dropdown ,radio button in the same line in the asp.net using css
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted May 3, 2023, 4:11 AM
Try this:
CSS:
Manav MathurPosted May 2, 2023, 1:17 PM
Try this:
HTML:
CSS:
.form-group label,
.form-group input,
.form-group select,
.form-group .radio {
display: inline-block;
margin-right: 10px;
}
This code will align the label, textbox, dropdown, and radio button in the same line. The
display: inline-block;property makes each element behave like an inline element while retaining their block-level properties. Themargin-right: 10px;property provides a 10px margin to the right of each element to create some space between them.Hope this helps!