-1

How can I draw the line showing in the picture below? enter image description here

my current page looks like this: enter image description here

I want to add that line at the top with the same title (just to mention I'm using bootstrap 5)

<div class="container-fluid fixed-bottom" style="margin-bottom: 16px;">
  <div class="row align-items-center" style="margin-left: 196px; margin-right: 196px;">
    <div class="col align-items-center d-flex justify-content-center">
      <div class="text-center bottomElement">
        <img class="img-fluid bottomIcon" src="/assets/business.png" width="56px" height="56px" />
        <p class="bottomText" style="color: white;">Business</p>
      </div>
    </div>
    <div class="col align-items-center d-flex justify-content-center">
      <div class="text-center bottomElement">
        <img class="img-fluid bottomIcon" src="/assets/calculator.png" width="56px" height="56px" />
        <p class="bottomText" style="color: white;">Calculator</p>
      </div>
    </div>
    <div class="col align-items-center d-flex justify-content-center">
      <div class="text-center bottomElement">
        <img class="img-fluid bottomIcon" src="/assets/oogPermits.png" width="56px" height="56px" />
        <p class="bottomText" style="color: white;">OOG Permits</p>
      </div>
    </div>
    <div class="col align-items-center d-flex justify-content-center">
      <div class="text-center bottomElement">
        <img class="img-fluid bottomIcon" src="/assets/services.png" width="56px" height="56px" />
        <p class="bottomText" style="color: white;">Services</p>
      </div>
    </div>
    <div class="col align-items-center d-flex justify-content-center">
      <div class="text-center bottomElement">
        <img class="img-fluid bottomIcon" src="/assets/career.png" width="56px" height="56px" />
        <p class="bottomText" style="color: white;">Career</p>
      </div>
    </div>
  </div>
</div>
TylerH
  • 20,799
  • 66
  • 75
  • 101
  • Does this answer your question? [Add centered text to the middle of a horizontal rule](https://stackoverflow.com/questions/2812770/add-centered-text-to-the-middle-of-a-horizontal-rule) – markfila Oct 20 '22 at 19:05

2 Answers2

1

You can use flexbox. Then, you have to play with the borders. Here is an example

<html>
  <header>
    <meta charset="utf-8" />
    <title>Example App</title>
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
      rel="stylesheet"
      integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
      crossorigin="anonymous"
    />
  </header>

  <body>
    <div class="content d-flex justify-content-center">
      <div class="left-border align-self-center"></div>
      <div class="text">FAST NAVIGATOR</div>
      <div class="right-border align-self-center"></div>
    </div>
    <div class="text-center">Your content here</div>
  </body>
</html>

<style>
  .content {
    padding: 1rem;
  }
  .left-border {
    border: 2px solid black;
    width: 100%;
    height: 10px;
    border-bottom: none;
    border-right: none;
    background: transparent;
  }

  .text {
    font-size: 12px;
    white-space: nowrap;
    padding-left: 16px;
    padding-right: 16px;
    margin-top:-8px;
  }

  .right-border {
    border: 2px solid black;
    width: 100%;
    height: 10px;
    border-bottom: none;
    border-left: none;
    background: transparent;
  }
</style>
Asmoth
  • 552
  • 1
  • 13
1

fieldset {
  padding: 0;
  height: 8px;
  border-bottom: none;
}
<fieldset>
  <legend align="center">Title</legend>
</fieldset>
Andrei Fedorov
  • 3,689
  • 2
  • 13
  • 25