I am looking to utilize Bootstrap's list group feature to create a navigation bar similar to the image below:
https://i.sstatic.net/bndVl.png
I am curious about how I can shift them to the left. Here is what I have attempted so far.
.list-group-item {
display: flex;
align-items: center;
}
.list-group-item a {
float: left;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="07656868737473756677473329312935">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="list-group">
<a class="list-group-item list-group-item-action"><i class="fa-brands fa-twitter"></i></a>
<a href="../home.html" class="list-group-item-action"><i class="fa-solid fa-house"></i>Home</a>
<a href="../explore/index.css" class="list-group-item list-group-item-action active" aria-current="true"><i class="fa-solid fa-hashtag"></i>Explore</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-bell"></i>Notifications</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-envelope"></i>Messages</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-bookmark"></i>Bookmarks</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-list"></i>Lists</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-user"></i>Profile</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-circle-minus"></i>More</a>
</div>
Update
I experimented with setting the icons' min-width, but it did not work as expected because I now realize that I did not clearly present the entire issue... This list-group is part of a column in my grid. My apologies!
Below you will find my complete code:
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Explore</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="02606d6d76717670637242372c332c32">[email protected]</a>/dist/css/bootstrap.min.css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet" />
</head>
<body>
<div class="container text-center">
<div class="row">
<!-- Left column -->
<div class="col">
<div class="list-group">
<a class="list-group-item list-group-item-action"><i class="fa-brands fa-twitter"></i></a>
<a href="../home.html" class="list-group-item list-group-item-action"><i
class="fa-solid fa-house"></i>Home</a>
<a href="../explore/index.css" class="list-group-item list-group-item-action active" aria-current="true"><i class="fa-solid fa-hashtag"></i>Explore</a>
<a href="#" class="list-group-item list-group-item-action"><i
class="fa-solid fa-bell"></i>Notifications</a>
<a href="#" class="list-group-item list-group-item-action"><i
class="fa-solid fa-envelope"></i>Messages</a>
<a href="#" class="list-group-item list-group-item-action"><i
class="fa-solid fa-bookmark"></i>Bookmarks</a>
<a href="#" class="list-group-item list-group-item-action"><i class="fa-solid fa-list"></i>Lists</a>
<a href="#" class="list-group-item list-group-item-action"><i
class="fa-solid fa-user"></i>Profile</a>
<a href="#" class="list-group-item list-group-item-action"><i
class="fa-solid fa-circle-minus"></i>More</a>
</div>
</div>
<!-- Center column -->
<div class="col">
Column
</div>
<!-- Right column -->
<div class="col">
Column
</div>
</div>
</div>
</body>