I am encountering a small problem with my CSS
code. I am trying to add a Vertical line after
my heading using bootstrap utilities, but I am running into an issue.
Here is a real-time example of the code I am working on:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="eb8984849f989f998a9babdec5dac5d8">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" />
<title>Bootstrap</title>
</head>
<body class="bg-dark text-white">
<div class="container mt-5">
<h3 class="position-relative d-inline-block fw-bold">
My Title Here
<hr style="height: 2px;" class="position-absolute top-50 start-100 translate-middle-y opacity-100 w-100 my-0 ms-4 bg-primary" />
</h3>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9bbb6b6adaaadabb8a999ecf7e8f7ea">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Expected Outcome:
https://i.sstatic.net/INfjK.png
Thank you!