Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can right align icon in Menu of Blazor App?

I want add a right icon to Menu:

My code using float: right but it not working:

<li class="nav-item px-3">
            <NavLink class="nav-link" @onclick="() => TogleSubmenu(NavSubmenu.Second)">               
                Upload <img src="../images/upicon.png"  style="float: right; height: 10px; width: 15px;">
            </NavLink>
 </li>

Result:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

How can right align icon in Menu of Blazor App?

>Solution :

Looks like you are using flexbox, so, just use justify-content to align your items to the side.
Add justify-content: space-between to .nav-link, and it should work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading