TheWandererr TheWandererr - 3 months ago 6
CSS Question

Formular with multiple Elements in line

Hey guys im pretty new to html, css, javascript and jquerymobile. I have a question it might seem simple but i just cant figure it out.

Note: im Using a website called https://ezoui.com/app/index.html for this project.

I want to create a formular (html/jquerymobile based) where a user can insert different values now comes my problem. I want some of those elements to be in line kinda like this.

[Label] [textArea/input] _______whitespace_______________ [Label] [textArea/input]

[Label] [textArea/input] _______whitespace_______________ [Label] [textArea/input]

[Label] [textArea/input]

I can only manage to get a Label and a textarea in line not multiple.

Any suggestions and example are appreciated.

Answer

p {
  float: left;
  margin-right: 15px !important;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />



<div class="row">
  <div class="col-xs-6">
    <p>some Label</p>
    <input type="text">
  </div>
  <div class="col-xs-6">
    <p>some other Label</p>
    <input type="text">
  </div>
</div>
<div class="row">
  <div class="col-xs-6">
    <p>sweg</p>
    <input type="text">
  </div>
  <div class="col-xs-6">
    <p>another</p>
    <input type="text">
  </div>
</div>

Comments