Html 工作台宽度100%超过主材料导航列表

Html 工作台宽度100%超过主材料导航列表,html,css,angular,angular-material,Html,Css,Angular,Angular Material,我有以下代码来呈现mat nav列表中的表格: <mat-nav-list> <table> <tr>Node Information</tr> <tr> <td>Name</td> <td *ngIf="activeNode">{{activeNode.Name}}</td> &l

我有以下代码来呈现
mat nav列表中的表格

<mat-nav-list>
    <table>
        <tr>Node Information</tr>
        <tr>
            <td>Name</td>
            <td *ngIf="activeNode">{{activeNode.Name}}</td>
          </tr>
        <tr>
            <td>AutomationId</td>
            <td *ngIf="activeNode">{{activeNode.AutomationId}}</td>
        </tr>
        <tr>
          <td>ClassName</td>
          <td *ngIf="activeNode">{{activeNode.ClassName}}</td>
        </tr>
        <tr>
            <td>ControlType</td>
            <td *ngIf="activeNode">{{activeNode.ControlType}}</td>
        </tr>
      </table>
    <mat-accordion>
        <app-tree-display  [nodeElements]="nodeElements" (clickedNodeCallback)="clickedNode($event[0])"></app-tree-display>
    </mat-accordion>
</mat-nav-list>

节点信息
名称
{{activeNode.Name}
自动识别
{{activeNode.AutomationId}
类名
{{activeNode.ClassName}
控件类型
{{activeNode.ControlType}

我希望表格占据mat nav列表宽度的100%,但当我将宽度设置为100%时,它会占据整个屏幕,如下所示:


如何限制宽度以匹配父元素?

如果要编辑mat nav列表的宽度,必须在边框样式下方添加所需的自定义宽度

表格{
宽度:100%;
}
mat nav列表{
显示:块;
边框:1px实心;
/*宽度:600px;这是一个示例*/
}

节点信息
名称
{{activeNode.Name}
自动识别
{{activeNode.AutomationId}
类名
{{activeNode.ClassName}
控件类型
{{activeNode.ControlType}

父元素是否指定了宽度?即使只是100%?