Login   Register  
PHP Classes
elePHPant
Icontem

File: exemplo

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Thiago Silva Ferreira  >  Gerar Tabela Semanticamente Correta  >  exemplo  >  Download  
File: exemplo
Role: Example script
Content type: text/plain
Description: exemplo de uso
Class: Gerar Tabela Semanticamente Correta
Generate HTML tables defined programmatically
Author: By
Last change:
Date: 2008-05-06 09:17
Size: 910 bytes
 

Contents

Class file image Download
<style type="text/css" media="all">
    table#tabela { font:18px/20px Georgia, "Times New Roman", Times, serif; border:2px solid #006699; width:50%; margin:0 auto; }
    table#tabela caption { line-height:30px; margin:0 auto; }
    table#tabela th { padding:5px; color:#FFFFFF; background:#003366; font:bold 22px "trebuchet MS", Arial, Tahoma; }
    table#tabela th.cinza { color:#CCCCCC!important; }
    table#tabela td { padding:2px; color:#000; background:#f7f7f7; }
    table#tabela tr.vermelho td { color:#CC0000!important; }
</style>
<?php

require_once("tabela.class.php");
$tabela = new tabela("id=\"tabela\""1);
$tabela->setCapition("Tabela Gerada Dinamicamente Pela Classe <b>" get_class($tabela) . "</b>" );
$tabela->th( array( array("Nome"" class=\"cinza\""), "Idade") );
$tabela->td( array("Mane""21") );
$tabela->td( array("Ze"30), " class=\"vermelho\"" );

print 
$tabela->exibe();

?>