Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
319 views
in Technique[技术] by (71.8m points)

css - DataTables stays at the bottom of the html page

My HTML page has a 'main' section and a 'sidebar' section. The following are the css codes:

$('#tabdat').DataTable();
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js">

<div class="sidebar" style="background-color: #e5e4d7;
        margin-right: 10px;
        margin-left: 0px;
        margin-bottom: 10px;
        margin-top: 5px;
        border-radius: 5px;
        padding:20px;
        width:200px;
        display:inline-block" ;>
  <h4>LAST 30 DAYS</h4>

  <ul>
    <li><a href="accessories.php">MOBILE HANDSETS</a></li>
    <li><a href="camera.php">CAMERA PHOTO</a></li>
  </ul>
</div>

<div class="main" style="background-color: #e5e4d7;
        margin-right: 0px;
        margin-left: 270px;
        margin-bottom: 10px;
        margin-top: 5px;
        border-radius: 5px;
        padding:20px;
        font-size: 70%;
        display:inline-block;">
  <h5 style="font-size:120%;">VANGUARD - MOBILE PHONE HANDSET</h5>
  <table id='tabdat' class="row-border" cellspacing="0" width="100%">
    <thead>
      <tr>
        <th>PARAMETER</th>
        <th>SAMPLE</th>
        <th>HOUSEHOLDS</th>
        <th>POPULATION</th>
        <th>SPENDS IN INR CR</th>
        <th>AVERAGE SPENDS IN INR</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Tiger Nixon</td>
        <td>System Architect</td>
        <td>Edinburgh</td>
        <td>61</td>
        <td>2011/04/25</td>
        <td>$320,800</td>
      </tr>
      <tr>
        <td>Garrett Winters</td>
        <td>Accountant</td>
        <td>Tokyo</td>
        <td>63</td>
        <td>2011/07/25</td>
        <td>$170,750</td>
      </tr>
    </tbody>
  </table>
</div>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Toy should use quotation marks.

<div class="main">

Currently you have used: main


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...