我有一个包含多个dataTables的视图,
第一个获得巨大利润的项目,它与库中的CSS没有任何关系。
我尝试了很多事情。
将表格放在顶部的唯一方法是覆盖
clear:both
到
清除:无
在
.dataTables_wrapper
class,但是在那之后,在第一个表和第二个表之间,两个元素之间也有很大的差异。
这里是问题的预览:
这是我的自定义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>