我有一个包含多个数据表的视图,
第一个是从库中获取一个巨大的空白,而不涉及任何css。
我试过很多东西。
将表置于顶部的唯一方法是覆盖
到
clear:none
上
.dataTables\u包装
但是在第一张桌子和第二张桌子之间,这两个元素之间也有很大的口角。
这里是我的自定义css(这不会影响bug边距效果):
.dataTables_wrapper {
position: relative;
width: 99% !important;
margin-bottom: 3em;
}
/*table#evaluations{*/
/*clear: none;*/
/*}*/
/**/
table.dataTable {
width: 99% !important;
top : 0;
margin: 0px;
clear: both;
border-collapse: separate;
border-spacing: 0;
table-layout: fixed;
}
这里是我的html的一部分:
<div class="table_evaluateur">
<!-- evaluations -->
<h1><?php echo __('Liste de mes évaluations en cours', array(), 'messages') ?></h1>
<form action="<?php echo url_for($url_redirection, array('action' => 'batch')) ?>" method="post">
<?php echo '<input type="hidden" name="evaluation_mode" id="evaluation_mode" value="'.$evaluation_mode.'">' ?>
<ul class="sf_admin_actions">
</ul>
<div class="sf_admin_list">
<table id="evaluations" class="evaluations display" cellpadding="0">
<thead>
<tr>
<th class="select-filter"><?php echo __('Appel à projet'); ?></th>
<th class="input-filter"><?php echo __('Candidat'); ?></th>
<th class="input-filter"><?php echo __('Titre long'); ?></th>
<th class="input-filter"><?php echo __('Titre court'); ?></th>
<th class="input-filter"><?php echo __('Unité'); ?></th>
<th class="select-filter"><?php echo __('Institut'); ?></th>
<th class="select-filter"><?php echo __('Type de demandes'); ?></th>
<th class="select-filter"><?php echo __('Statut'); ?></th>
<th class="sf_admin_foreignkey sf_admin_list_th_date_cloture_evaluation_ap"><?php echo __('Date fin de l\'évaluation'); ?></th>
<th id="sf_admin_list_th_actions" class="no-sort"><?php echo __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($evaluations as $i => $evaluation_candidature): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
<?php
$evaluation_en_cours = false;
$criteres = $evaluation_candidature->getEvaluationCandidatureCritere();
if (count($criteres) || $evaluation_candidature->getNoteGlobale() != null || $evaluation_candidature->getAppreciation() != null) {
$evaluation_en_cours = true;
}
?>
<tr <?php echo $odd ?>">
<?php include_partial('accueil/list_td_tabular_evaluateur', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours))?>
<?php include_partial('accueil/list_td_actions', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours)) ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</form><!-- evaluations-->
</div>
<div class="table_rapporteur">
<!-- rapport -->
<h1><?php echo __('Liste de mes rapports en cours', array(), 'messages') ?></h1>
<form action="<?php echo url_for($url_redirection, array('action' => 'batch')) ?>" method="post">
<?php echo '<input type="hidden" name="evaluation_mode" id="evaluation_mode" value="'.$evaluation_mode.'">' ?>
<ul class="sf_admin_actions">
</ul>
<div class="sf_admin_list">
<table id="rapports" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<?php include_partial('accueil/list_th_tabular')?>
<th id="sf_admin_list_th_actions" class="no-sort"><?php echo __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($rapports as $i => $evaluation_candidature): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
<?php
$evaluation_en_cours = false;
$criteres = $evaluation_candidature->getEvaluationCandidatureCritere();
if (count($criteres) || $evaluation_candidature->getNoteGlobale() != null || $evaluation_candidature->getAppreciation() != null) {
$evaluation_en_cours = true;
}
?>
<tr <?php echo $odd ?>">
<?php include_partial('accueil/list_td_tabular_rapporteur', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours))?>
<?php include_partial('accueil/list_td_actions', array('evaluation_candidature' => $evaluation_candidature, 'evaluation_mode' => $evaluation_mode, 'evaluation_en_cours' => $evaluation_en_cours)) ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</form><!-- rapports-->
</div>