Home > Blockchain >  Bootstrap Navbar text alignment
Bootstrap Navbar text alignment

Time:12-23

I've been trying for exactly 2 days to make this style, somehow I couldn't do it like on Max Back's site

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div >
  <nav >
    <div >
      <img src="assets/icon.jpg" width="48" height="48"  alt="">
      <span>Emre İlhan</span>
      <img src="assets/icons8-verified-account-20.png" alt="">
      <button  type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span ></span>
            </button>
      <div  id="navbarNav">
        <ul >
          <li >
            <a  aria-current="page" href="#"><span >01</span> Active</a>
          </li>
          <li >
            <a  href="#"><span >02</span> Link</a>
          </li>
          <li >
            <a  href="#"><span >03</span> Link</a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
</div>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL jjXkk Q2h455rYXK/7HAuoJl 0I4" crossorigin="anonymous"></script>

CodePudding user response:

Try this code for navbar text-right

<nav >
  <a  href="#">Brand</a>
  <button  type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span ></span>
  </button>
  <div  id="navbarNav">
    <ul >
      <li >
        <a  href="#">Home</a>
      </li>
      <li >
        <a  href="#">About</a>
      </li>
      <li >
        <a  href="#">Contact</a>
      </li>
    </ul>
  </div>
</nav>

CodePudding user response:

try this

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8 y gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>
    .img-container{
        background-color: black;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid rgb(76, 76, 76);
    }
    .img{
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }
    .main{
        display: flex;
    }
    .text{
        margin-left: 5px;
        padding: 3px;
    }
</style>
<body>
    <div  >
        <div >
            <img src="33720.jpg"  alt="">
        </div>
        <div >
            <div>Emre Ihan <i ></i></div>
            <div style="color: gray;"><i ></i>offical</div>
        </div>
    </div>
</body>
</html>
  • Related