Skip to content

Instantly share code, notes, and snippets.

@LaunchedBerry07
Last active August 24, 2022 07:51
Show Gist options
  • Save LaunchedBerry07/ad2d3c261dd6c04cc7ada28e20f35f81 to your computer and use it in GitHub Desktop.
Save LaunchedBerry07/ad2d3c261dd6c04cc7ada28e20f35f81 to your computer and use it in GitHub Desktop.
icon-bar-vertical
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="icon-bar">
<a class="active" href="#"><i class="fa fa-home"></i></a>
<a href="#"><i class="fa fa-search"></i></a>
<a href="#"><i class="fa fa-envelope"></i></a>
<a href="#"><i class="fa fa-globe"></i></a>
<a href="#"><i class="fa fa-trash"></i></a>
</div>
.icon-bar {
width: 90px; /* Set a specific width */
background-color: #555; /* Dark-grey background */
}
.icon-bar a {
display: block; /* Make the links appear below each other instead of side-by-side */
text-align: center; /* Center-align text */
padding: 16px; /* Add some padding */
transition: all 0.3s ease; /* Add transition for hover effects */
color: white; /* White text color */
font-size: 36px; /* Increased font-size */
}
.icon-bar a:hover {
background-color: #000; /* Add a hover color */
}
.active {
background-color: #04AA6D; /* Add an active/current color */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment