Why does not the classe table-responsive in HTML work with Bootstrap?

0

I try to build a data table that should be a responsive design. That is, it uses a small size when it is displayed on small devices: For example:

But I get this:

I'm sure I use the same html code as the teacher and I do not think it comes from the css. Utilio <div class="table-responsive"> I thought that would be enough. I also think that I use the same version of Bootstrap as the teacher.

Here is the code html

    <div class="row row-content">
        <div class="col-xs-12 col-sm-9">
            <h2>Facts &amp; Figures</h2>
            <div class="table-responsive">
                <table class="table table-striped">
                    <tr>
                        <td>&nbsp;</td>
                        <th>2013</th>
                        <th>2014</th>
                        <th>2015</th>
                    </tr>
                    <tr>
                        <th>Employees</th>
                        <td>15</td>
                        <td>30</td>
                        <td>40</td>
                    </tr>
                    <tr>
                        <th>Guests Served</th>
                        <td>15000</td>
                        <td>45000</td>
                        <td>100,000</td>
                    </tr>
                    <tr>
                        <th>Special Events</th>
                        <td>3</td>
                        <td>20</td>
                        <td>45</td>
                    </tr>
                    <tr>
                        <th>Annual Turnover</th>
                        <td>$251,325</td>
                        <td>$1,250,375</td>
                        <td>~$3,000,000</td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="col-xs-12 col-sm-3">
            <p style="padding:20px;"></p>
        </div>
    </div>
</div>

I'm following a Front-End Web Course UI Frameworks and Tools: Bootstrap 4, on Coursera. in particular the course on Bootstrap CSS components .

A person named MCheli did it well. It is from your code (which is identical to mine on the table) that the first screenshot comes Here is your GitHub repository for this exercise . Mine is about Bitbucket .

    
asked by ThePassenger 04.11.2017 в 17:03
source

0 answers