I am currently working on creating a hyperlink with an icon using glyphicon, and I am aiming to align both the icon and text in the center. Despite my attempts with padding and margin adjustments, it seems to affect both the icon and text. My goal is to solely adjust the position of the text while keeping the icon in place. Below is a snippet of my code:
.quick-links{
margin-left: 15px;
line-height: 2;
font-family: 'arial rounded MT';
border:1px solid;
}
.text-position{
display:inline-block;
font-size:18px;
padding:0px 0px 0px 5px;
margin: 0px 0px -15px 0px;
}
.quick-link-text a{
font-weight:500;
}
.quick-link-text a:hover{
text-decoration: none;
font-weight:1000;
}
.glyphicon-plus-sign{
font-size:24px;
}
Below is the HTML content:
<link rel ="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
<div class="quick-links col-lg-4 col-md-4">
<h3>
Quick Links
</h3>
<div class="quick-link-text">
<a href="#" class="glyphicon glyphicon-plus-sign"><div class="text-position"> First Link</div></a>
</div>
<div class="quick-link-text">
<a href="#" class="glyphicon glyphicon-plus-sign"><div class="text-position"> Second Link</div></a>
</div>
</div>