Is there a way to create a fixed width input-group-prepend
that is larger than its content, while still keeping the content centered horizontally?
I've experimented with text-center
and align-items-center
, but the content always ends up left aligned. How can I ensure it is centered within the input-group-text
?
.input-group-text {
min-width: 60px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">$</div>
</div>
<input type="text" class="form-control" id="inlineFormInputGroup" placeholder="Value">
</div>
</div>