Php table borders

0

hello friends I have this table that my report generates in excel

$mos.="<table border-collapse: separate; >


<tr>
        
        <th scope='col' bgcolor='#008000'>Solicitud Servicio</th>
		   <th scope='col' bgcolor='#008000'>Folio</th>
                <th scope='col' bgcolor='#008000'>Mes</th>
        <th scope='col' bgcolor='#008000'>Fecha</th>
   
        <th scope='col' bgcolor='#008000'>Departamento</th>
        <th scope='col' bgcolor='#008000'>Area</th>
        <th scope='col' bgcolor='#008000'>Tipo Servicio</th>
        <th scope='col' bgcolor='#008000'>Descripción del trabajo</th>
        <th scope='col' bgcolor='#008000'>Observaciones</th>
		<th scope='col' bgcolor='#008000'>Unidad</th>
        <th scope='col' bgcolor='#008000'>Costo</th>
     
      </tr><tr><td></td></tr>
      ";

but I get no border, I want to edge my board like I do?

    
asked by Esther 16.11.2018 в 21:14
source

2 answers

0

You can add styles to different elements, for example by setting table, tr, th, td you are applying the same style to those elements that would be bordering and that the text is centered.

<style>
table, tr, th, td{
border: 1px solid #000000;
text-align: center;
    }
</style>
<table border-collapse: separate; >
<tr >
        <th bgcolor='#008000'>Solicitud Servicio</th>
           <th scope='col' bgcolor='#008000'>Folio</th>
                <th scope='col' bgcolor='#008000'>Mes</th>
        <th scope='col' bgcolor='#008000'>Fecha</th>

        <th bgcolor='#008000'>Departamento</th>
        <th bgcolor='#008000'>Area</th>
        <th bgcolor='#008000'>Tipo Servicio</th>
        <th bgcolor='#008000'>Descripción del trabajo</th>
        <th bgcolor='#008000'>Observaciones</th>
        <th bgcolor='#008000'>Unidad</th>
        <th bgcolor='#008000'>Costo</th>
     
      </tr>
      <tr>
        <th>0</th>
        <th>1</th>
        <th>2</th>
        <th>3</th>
        <th>4</th>
        <th>5</th>
        <th>6</th>
        <th>7</th>
        <th>8</th>
        <th>9</th>
        <th>10</th>
      </tr>
      <tr>
        <th>0</th>
        <th>1</th>
        <th>2</th>
        <th>3</th>
        <th>4</th>
        <th>5</th>
        <th>6</th>
        <th>7</th>
        <th>8</th>
        <th>9</th>
        <th>10</th>
      </tr>
        <tr>
        <th>0</th>
        <th>1</th>
        <th>2</th>
        <th>3</th>
        <th>4</th>
        <th>5</th>
        <th>6</th>
        <th>7</th>
        <th>8</th>
        <th>9</th>
        <th>10</th>
      </tr>
  </table>
  
    
answered by 16.11.2018 / 21:32
source
0

$mos.="<table border-collapse: separate; border= 1px; >


<tr>
        
        <th scope='col' bgcolor='#008000'>Solicitud Servicio</th>
		   <th scope='col' bgcolor='#008000'>Folio</th>
                <th scope='col' bgcolor='#008000'>Mes</th>
        <th scope='col' bgcolor='#008000'>Fecha</th>
   
        <th scope='col' bgcolor='#008000'>Departamento</th>
        <th scope='col' bgcolor='#008000'>Area</th>
        <th scope='col' bgcolor='#008000'>Tipo Servicio</th>
        <th scope='col' bgcolor='#008000'>Descripción del trabajo</th>
        <th scope='col' bgcolor='#008000'>Observaciones</th>
		<th scope='col' bgcolor='#008000'>Unidad</th>
        <th scope='col' bgcolor='#008000'>Costo</th>
     
      </tr><tr><td></td></tr>
      ";
    
answered by 16.11.2018 в 21:17