I am trying to align my input label inside the input box and float right
The input boxes are extended from b4.
Here is what it looks like now (arrow showing what I want to do)
Here is the layout (It's in vue but just ignore. Only showing for how I am arranging my elements.
<label class="input-label" :for="index" v-if="showLabel">{{ label }}
<span v-if="icon" :class="icon"></span>
<input v-if="form !== false"
type="text"
v-validate="validation"
v-model="current"
:id="index"
:name="index"
:disabled="disabled"
:placeholder="label"
class="form-control"
:class="{ 'is-invalid': form.errors.has(index) }" @input="triggerEvent">
</label>
And here is my attempt at css:
f.input-icon {
position: relative;
}
.input-icon input {
text-indent: 30px;
}
.input-icon span {
position: absolute;
top: 50px;
left: 15px;
font-size: 20px;
}
.input-label {
color: blue;
}
label {
float: right;
width: 10em;
position: relative;
margin-right: 1em;
}