the content of a td rowspan = 4 does not cover 100% of the td

0

I am designing a document with html tables, the problem is that I want to put a logo or image in a <td> that covers 4 rows but the image only takes me the space equivalent to one row, although the <td> four rows the image only takes me 1, how can I do it so that I take all the space of <td> I mean the space of the 4 rows

this is my code

<table class="" cellpadding="0" cellspacing="0">

                          <tr border="2">
                              <td width="30%" rowspan="4" class="cellB">
                                <div width="100%" height="100%">
                                  <img width="100px" height="50px" src="logoo.png">
                                </div>
                              </td>
                              <td colspan="2" class="tituloPrincipal cellB" height="45px" style="background: #9ACD32; color: white;"> 
                                <center> 
                                  <div height="100%" style="margin-top:9px;">
                                    REQUISICION DE PERSONAL
                                  </div> 
                                </center>
                              </td>
                           </tr>

                           <tr>
                             <td colspan="2" class="textoT cellB" height="45px">
                              <center>
                                Para iniciar con el reclutamiento y selecci&oacute;n de personal, es necesario que la presente requisici&oacute;n se encuentre debidamente llenada y firmada
                              </center>

                             </td>
                           </tr>
                           <tr>
                             <td class="subTitulos cellB" style=""> 
                              <center>
                                FECHA DE SOLICITUD
                              </center>
                             </td>
                             <td class="subTitulos cellB"> 
                              <center>
                                FECHA DE RECEPCION
                              </center>
                             </td>
                           </tr>
                           <tr>
                             <td class="textoT cellB" style=""> 
                              <center>
                                &nbsp;28/12/2017 12:20:01
                              </center>
                             </td>
                             <td class="textoT cellB"> 
                              <center>
                                &nbsp;28/12/2017
                              </center>
                             </td>
                           </tr>


</table>
    
asked by Alejandro.C 18.05.2018 в 17:57
source

1 answer

1

You could use css!

For example, you could add an id #img like the following and then apply it to your <td>

CSS

#img
{
  background-image: url("tuimagen");
  background-repeat: no-repeat;
  background-size: 100% 100%;    
}

HTML

<td width="30%" rowspan="4" class="cellB" id="img"></td>

I hope it's what you were looking for!

    
answered by 18.05.2018 / 18:17
source