I'm working on creating a Google review section within a contact card that includes a Google logo icon, text element (Google Review), and Font Awesome 5 stars. My goal is to have everything aligned vertically straight. However, because I assigned the col-2 class, everything is wrapping onto the next line. I will provide an image of the desired output.
https://i.sstatic.net/UnIf4.png
.row {
height: 400px;
background-color: grey;
}
.col-2 {
background-color: yellow;
}
/* google-review */
.google-review {
transform: rotate(90deg);
transform-origin: top left;
top:0;
background-color: #88206d;
overflow: visible;
}
.g-logo img {
transform: rotate(-90deg);
width: 38px;
background-color: #fff;
padding: 5px;
border-radius: 22px;
box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.53);
-webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.53);
-moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.53);
}
.stars {
background: -webkit-linear-gradient(#FF3D00, #FFCE31);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2d5e41444e46004e4c5f42585e48416d1c0315031c">[email protected]</a>/slick/slick.css'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/gh/kenwheeler/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="10637c79737b50213e283e21">[email protected]</a>/slick/slick-theme.css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./style.css">
<div class="container">
<div class="row">
<div class="col-5">
</div>
<div class="col-2 position-relative">
<div class="google-review position-absolute text-light px-4 py-2">
<div class="gtext-review"><span class="g-logo pr-3"><img src="https://i.ibb.co/PwTGZkb/search.png"></span>Google Review <span class="stars"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></span></div>
</div>
</div>
<div class="col-5">
</div>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7a091613191157191b08150f091f163a4b5442544b">[email protected]</a>/slick/slick.min.js'></script>
<script src="./script.js"></script>