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粉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),