Find solution

How to align two boxes in a line?

Check our answers to ‘How to align two boxes in a line?’ - we found 23 replies and comments relevant to this matter. The best answers are submitted by users of Stack Overflow, Google Answers and Quora.

Best solution

  • How to align two text boxes on same line with CSS

    I have two text boxes that by default, use "display: block;" style. I want to keep the label above the first textbox, but I want the second textbox to be shown just to the right of the first text box. Here is my view: <div class="form-group"> @Html.LabelFor(model => model.DescriptiveSize, "Descriptive Size") @*2014-04-11: Issue #93*@ @Html.TextBoxFor(model => model.DescriptiveSize, null, new { @class = "form-control", maxlength = "10"...

    Answer:

    You can add a "float: left" property to your two textboxes. It makes it align on same line...

    Mark as irrelevant Undo

Other solutions