JSFiddle - React, Tailwind, and code Playground
by armyofda12mnkeys
HTML
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<div class="col-xs-12">
<div class="col-xs-12 col-sm-4 label">
<label for="firstname">First Name</label>
</div>
<div class="col-xs-12 col-sm-8 answer">
<input type="text" class="form-control" placeholder="Enter your First Name here" />
</div>
<div class="col-xs-12 col-sm-4 label">
<label for="firstname">House Number and Street</label>
</div>
<div class="col-xs-12 col-sm-8 answer">
<input type="text" class="form-control" placeholder="Enter your house # here" />
</div>
<div class="col-xs-12 col-sm-4 label">
<label for="firstname">House Number and Street and longer label and longer label and longer label and longer label and longer label </label>
</div>
<div class="col-xs-12 col-sm-8 answer">
<input type="text" class="form-control" placeholder="Enter your house # here" />
</div>
</div>
CSS
label {
color: black;
text-align: left;
width: 100%;
}
@media screen and (min-width : 768px) {
label {
text-align: right;
}
}