Welcome Guest, Not a member yet? Register   Sign In
html Table helper
#6

[eluser]InsiteFX[/eluser]
Code:
$tmpl = array (
               'table_open'          => '<table border="0" cellpadding="4" cellspacing="0">',

               'heading_row_start'   => '<tr>',
               'heading_row_end'     => '</tr>',
               'heading_cell_start'  => '<th>',
               'heading_cell_end'    => '</th>',

               'row_start'           => '<tr>',
               'row_end'             => '</tr>',
               'cell_start'          => '<td>',
               'cell_end'            => '</td>',

               'row_alt_start'       => '<tr class="alt">',
               'row_alt_end'         => '</tr>',
               'cell_alt_start'      => '<td>',
               'cell_alt_end'        => '</td>',

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

$this->table->set_template($tmpl);

In your CSS file add a class:
Code:
.alt {
    background: #ddd;
}

You can do this for any table rows columns and cells.

InsiteFX


Messages In This Thread
html Table helper - by El Forum - 09-09-2010, 04:12 AM
html Table helper - by El Forum - 09-09-2010, 05:30 AM
html Table helper - by El Forum - 09-09-2010, 06:15 AM
html Table helper - by El Forum - 09-09-2010, 06:44 AM
html Table helper - by El Forum - 09-09-2010, 06:59 AM
html Table helper - by El Forum - 09-09-2010, 12:40 PM
html Table helper - by El Forum - 09-09-2010, 03:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB