I am working on creating a box that displays the profile photo of a user along with their nickname on the right side. To achieve this, I have attempted various approaches while utilizing Bootstrap 4:
- My initial attempt involved using columns, but it did not yield the desired result.
- After consulting online resources and suggestions from other users, I still could not find a suitable solution. (Refer to this specific answer for more information.)
Subsequently, I experimented with flexbox utilities, but it appears that I may be implementing them incorrectly.
Realizing my struggles, I decided to seek help from the knowledgeable community here in hopes of finding a resolution. To better illustrate my issue, take a look at this example: https://i.sstatic.net/XcSgQ.png
Below is the code snippet that I have been working on (apologies for the lack of organization):
:root {
--nsfr-pfp-border-radius: none;
}
.wrapper-fluid {
padding: 8em;
}
.nsfr-pfp {
margin-right: auto;
margin-left: auto;
max-height: none;
max-width: 100%;
border-radius: var(--nsfr-pfp-border-radius);
}
.nsfr-pfp-wrap {
width: 250px;
height: 250px;
cursor: pointer;
border-radius: 50%;
background-color: transparent;
overflow: hidden;
float:left;
}
.wrap {
clear: both;
background-color: var(--wrap);
border-radius: 10px;
padding: 2em 3.4em;
}
.username {
display: inline-block;
font-size: 50px;
color: var(--body-color);
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="10727f7f64636462716050243e263e20">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<div class="wrapper-fluid">
<div class="container">
<div class="wrap">
<div class="col-md-6">
<div class="nsfr-pfp-wrap">
<img class="nsfr-pfp" alt="Profile Picture"
src="https://www.nosfera.app/build/i/_global/user_default.png">
</div>
</div>
<div class="col-md-6">
<h1 class="username">
Jesztar
</h1>
</div>
</div>
</div>
</div>
If there are any missing details or improvements needed, please feel free to provide feedback.
Also, as a novice in front-end development, I appreciate your patience and understanding towards my limited knowledge in this field.