Mat-Nav-List horizontal instead of vertical?

前端 未结 7 995
没有蜡笔的小新
没有蜡笔的小新 2021-02-07 23:18

How do I make the following horizontal instead of the (apparent default) of vertical? It is located within navigation.component.html within my Angular 5.2.7 application that wa

相关标签:
7条回答
  • 2021-02-07 23:52

    Here's what I did to handle that horizontal navbar issue:

    <mat-nav-list class="lists_class">
     <a routerLink="link" mat-list-item matLine class="link_class">name</a>
    <mat-nav-list>
    
    .lists_class {
        width: 100%;
    }
    .link_class {
        display: inline;
        float: left;
        width: min-content;
    }
    

    The key for me was adjusting the width. Hope this works/helps, cheers!

    0 讨论(0)
提交回复
热议问题