I have a navbar with an img. By default it is to the left of the page. I want to display it to the right
.logo-img{
float: right;
margin: 0px 15px 15px 0px;
<a class="navbar-brand logo-img" href="#"><img src="images/my_graphic_transparent.jpg" alt="shield" width="90" ></a>
I tried creating .log-img in the styles area and then used it in the a class navbar however the graphic would not move to the right
.logo-img{
float: right;
margin: 0px 15px 15px 0px;
<a class="navbar-brand logo-img" href="#"><img src="images/my_graphic_transparent.jpg" alt="shield" width="90" ></a>
If you use Bootstrap-5 you can use class d-flex in parent container for link like this:
This is a result:
All documentation about d-flex in Bootstrap you will find here