Tables and DIVs

Other than buttons, we also have to apply the proper Bootstrap styles to our <table> elements:

<h3>Questions</h3><div *ngIf="questions.length > 0">    <div class="table-responsive">        <table class="table table-hover questions">[...]

Here we added the .table and .table-hover classes to the <table> element, and also wrapped it up within a new <div class="table-responsive"> element: the classes will affect the table look and feel, while the container element--as the name implies --will give responsive features to our table; more specifically, the table will scroll horizontally on small devices (under 768 px) if there's no way to resize its contents within the browser's viewport.

The Bootstrap default table requires little or no styling: ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.