The issue at hand may not be caused by applying any of those classes to the anchor tag, but rather by the containers surrounding the anchors.
To achieve the desired outcome, consider using a flexbox with the .justify-content-between
property within a row. This will ensure that the buttons have equal horizontal spacing between them and fill the row. You can also add padding to the buttons using Bootstrap 4's padding classes. Alternatively, you can create a custom class with padding, just remember to use !important
if needed. Here is a working example:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-12 d-flex justify-content-between">
<a href="#" class="btn btn-lg btn-outline-success px-5 py-3">HTML</a>
<a href="#" class="btn btn-lg btn-outline-success px-5 py-3">CSS</a>
<a href="#" class="btn btn-lg btn-outline-success px-5 py-3">JavaScript</a>
</div>
</div>
</div>