I'm working on enhancing a project by integrating more Bootstrap elements. In one part, I have a circular div with the text "Go to Homepage" below it. My goal is to center the span under the div and have it appear on a single line. How can I achieve this using Bootstrap?
.avatar {
margin: 10px;
border-radius: 50%;
height: 90px;
text-align: center;
width: 90px;
float: right;
border: 5px solid #fafafa;
background-color: blue;
}
.initials {
font-size: 2rem;/* 50% of parent */
position: relative;
top: 1.2rem; /* 25% of parent */
color: #fafafa;
font-weight: 700;
}
.update-homepage-link {
float: right;
color: #fafafa;
font-weight: bold;
color: pink;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-6 col-xl-2 order-xl-3">
<div class="avatar">
<span class="initials"> WW </span>
<a class="update-homepage-link" href="">Go to Homepage</a>
</div>
Previously, I had used a different method to align the text below the circle, but now I am required to utilize Bootstrap for consistency. Despite experimenting with various spacing classes, I haven't found the perfect combination yet. Any suggestions would be greatly appreciated!