search

Home  >  Q&A  >  body text

Need icon next to navigation bar in bootstrap

I need help with this code to put the icon next to the first word Dashboard in the navigation bar using only Bootstrap without spacing,

Note: I used options like offset-5 and ms-5, but they are not what I need,

<div id="navbarcollapse" class="collapse navbar-collapse">
    
  <a href="Index.html" class="navbar-brand p-0">
    <img src="Images/icons-internet.png" class="w-50 h-50 " />
  </a>
    
  <ul class="navbar-nav">
    <li class="nav-item">
      <a class="nav-link" href="Index.html">DashBoard</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="Posts.html">Posts</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="Categories.html">Categories</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="Users.html">Users</a>
    </li>
  </ul>
P粉677684876P粉677684876459 days ago466

reply all(1)I'll reply

  • P粉099145710

    P粉0991457102023-09-15 10:45:24

    I found a solution to this problem...

    <img src="Images/icons-internet.png" class="col-8 offset-4 " />

    will contain the image that will be used as the navigation bar branding. The image is 8 columns wide and offset 4 columns to the right.

    You can change the spacing by (offset),

    reply
    0
  • Cancelreply