1

Hello I have a simple angular application which displays the following when the component loads

enter image description here

The table for some reason is not displaying full width inside the left panel

template code is as follows

<div class="demo-graphs mdl-shadow--2dp mdl-color--white mdl-cell mdl-cell--8-col">
      <h3>Tasks Page    
      <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp full-width">
          <thead>
            <tr>
              <th class="mdl-data-table__cell--non-numeric full-width">Material</th>
              <th>Quantity</th>
              <th>Unit price</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td class="mdl-data-table__cell--non-numeric">Acrylic (Transparent)</td>
              <td>25</td>
              <td>$2.90</td>
            </tr>
            <tr>
              <td class="mdl-data-table__cell--non-numeric">Plywood (Birch)</td>
              <td>50</td>
              <td>$1.25</td>
            </tr>
            <tr>
              <td class="mdl-data-table__cell--non-numeric">Laminate (Gold on Blue)</td>
              <td>10</td>
              <td>$2.35</td>
            </tr>
          </tbody>
      </table>
</div>

Any ideas how I can display the table full width ?

user2180794
  • 1,425
  • 7
  • 27
  • 50

1 Answers1

0

Just change this line with

<table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp full-width">

with

<table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp full-width" style='width:100%'>

try this one with col-12

<div class="demo-graphs  mdl-color--white mdl-cell mdl-cell--12-col">

Updated Working Plunker

Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215