【问题标题】:Codeigniter table heading text wont centerCodeigniter 表格标题文本不会居中
【发布时间】:2017-07-19 21:32:01
【问题描述】:

我在使用 codeigniter 表库创建的表中的表标题有问题,这是我的表模板:

$tmpl = array (
                'table_open'          => '<table style="align: center;" border="5" >',

                'heading_row_start'   => '<tr style="border: 2px solid black; background-color: #2ecc71; font-weight:bold; color:white; align:center;">',
                'heading_row_end'     => '</tr>',
                'heading_cell_start'  => '<th style="align:center;border: 2px solid black;" height=70 width=200>',
                'heading_cell_end'    => '</th>',

                'row_start'           => '<tr style="background-color: #DBF6ED; font-weight:bold;">',
                'row_end'             => '</tr>',
                'cell_start'          => '<td style="border: 2px solid black;" align=center height=50>',
                'cell_end'            => '</td>',

                'row_alt_start'       => '<tr style="background-color: white; font-weight:bold;">',
                'row_alt_end'         => '</tr>',
                'cell_alt_start'      => '<td style="border: 2px solid black;" align=center height=50>',
                'cell_alt_end'        => '</td>',

                'table_close'         => '</table>'
          );

这就是它在表格标题中的作用:

如您所见,文本未居中。

【问题讨论】:

  • 试试你的styletext-align:center

标签: php codeigniter html-table


【解决方案1】:

使用text-align: center; 而不是align: center;

【讨论】:

    猜你喜欢
    • 2017-05-31
    • 1970-01-01
    • 1970-01-01
    • 2020-05-23
    • 1970-01-01
    • 2018-01-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多