After implementing the HTML code snippet provided in the template, I encountered an issue with the alignment of the icon and text. Currently, they are using justify-content which is not aligning them as intended.
<button type="submit" class="btn btn-primary btn-block btn-icon-split">
<span class="icon">
<i class="fas fa-search"></i>
</span>
<span class="text">Search</span>
</a>
</button>
I am seeking a solution to have the icon aligned left and the text centered within the button element.
.btn-icon-split {
padding: 0;
overflow: hidden;
display: inline-flex;
align-items: stretch;
justify-content: center;
}
.btn-icon-split .icon {
background: rgba(0,0,0,.15);
display: inline-block;
padding: .375rem .75rem;
}
.btn-icon-split .text {
display: inline-block;
padding: .375rem .75rem;
}
I have attempted different methods such as using float and bootstrap pull-right classes to achieve the desired layout without success.
The Bootstrap theme I am currently utilizing can be found here: