Bordes de tabla php

publicado por: Anonymous

hola amigos tengo esta tabla que me genera mi reporte en excel

_x000D_

_x000D_

$mos.="<table border-collapse: separate; >_x000D_
_x000D_
_x000D_
<tr>_x000D_
        _x000D_
        <th scope='col' bgcolor='#008000'>Solicitud Servicio</th>_x000D_
		   <th scope='col' bgcolor='#008000'>Folio</th>_x000D_
                <th scope='col' bgcolor='#008000'>Mes</th>_x000D_
        <th scope='col' bgcolor='#008000'>Fecha</th>_x000D_
   _x000D_
        <th scope='col' bgcolor='#008000'>Departamento</th>_x000D_
        <th scope='col' bgcolor='#008000'>Area</th>_x000D_
        <th scope='col' bgcolor='#008000'>Tipo Servicio</th>_x000D_
        <th scope='col' bgcolor='#008000'>Descripción del trabajo</th>_x000D_
        <th scope='col' bgcolor='#008000'>Observaciones</th>_x000D_
		<th scope='col' bgcolor='#008000'>Unidad</th>_x000D_
        <th scope='col' bgcolor='#008000'>Costo</th>_x000D_
     _x000D_
      </tr><tr><td></td></tr>_x000D_
      ";

_x000D_

_x000D_

_x000D_

pero me sale sin borde quiero ponerle borde a mi tabla como lo hago?

solución

Podes agregar estilos a distintos elementos, por ejemplo aca poniendo table, tr, th, td le estas aplicando el mismo estilo a esos elementos que seria que tengan borde y que el texto este centrado.

_x000D_

_x000D_

<style>_x000D_
table, tr, th, td{_x000D_
border: 1px solid #000000;_x000D_
text-align: center;_x000D_
    }_x000D_
</style>_x000D_
<table border-collapse: separate; >_x000D_
<tr >_x000D_
        <th bgcolor='#008000'>Solicitud Servicio</th>_x000D_
           <th scope='col' bgcolor='#008000'>Folio</th>_x000D_
                <th scope='col' bgcolor='#008000'>Mes</th>_x000D_
        <th scope='col' bgcolor='#008000'>Fecha</th>_x000D_
_x000D_
        <th bgcolor='#008000'>Departamento</th>_x000D_
        <th bgcolor='#008000'>Area</th>_x000D_
        <th bgcolor='#008000'>Tipo Servicio</th>_x000D_
        <th bgcolor='#008000'>Descripción del trabajo</th>_x000D_
        <th bgcolor='#008000'>Observaciones</th>_x000D_
        <th bgcolor='#008000'>Unidad</th>_x000D_
        <th bgcolor='#008000'>Costo</th>_x000D_
     _x000D_
      </tr>_x000D_
      <tr>_x000D_
        <th>0</th>_x000D_
        <th>1</th>_x000D_
        <th>2</th>_x000D_
        <th>3</th>_x000D_
        <th>4</th>_x000D_
        <th>5</th>_x000D_
        <th>6</th>_x000D_
        <th>7</th>_x000D_
        <th>8</th>_x000D_
        <th>9</th>_x000D_
        <th>10</th>_x000D_
      </tr>_x000D_
      <tr>_x000D_
        <th>0</th>_x000D_
        <th>1</th>_x000D_
        <th>2</th>_x000D_
        <th>3</th>_x000D_
        <th>4</th>_x000D_
        <th>5</th>_x000D_
        <th>6</th>_x000D_
        <th>7</th>_x000D_
        <th>8</th>_x000D_
        <th>9</th>_x000D_
        <th>10</th>_x000D_
      </tr>_x000D_
        <tr>_x000D_
        <th>0</th>_x000D_
        <th>1</th>_x000D_
        <th>2</th>_x000D_
        <th>3</th>_x000D_
        <th>4</th>_x000D_
        <th>5</th>_x000D_
        <th>6</th>_x000D_
        <th>7</th>_x000D_
        <th>8</th>_x000D_
        <th>9</th>_x000D_
        <th>10</th>_x000D_
      </tr>_x000D_
  </table>_x000D_
  

_x000D_

_x000D_

_x000D_

Respondido por: Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *