Search code examples
htmlsplithtml-tablespace

How to split td?


I'm trying to create a table with pictures and I want that on the first tr the picture will be big and in the second they will be smaller in 50%. how can I remove the space between them?

Html

<table class="photos" style="border-spacing: 0; border-width: 0; padding: 0 0; border-width: 0;  border: 1; width: 100%;" >
    <tr>
        <td><img src="Dad.jpg" alt="dad" /></td>
        <td><img src="gili.jpg" alt="gili" /></td>
        <td><img src="me2.jpg" alt="me" /></td>
    </tr>
    <tr style="border-collapse: collapse;">
        <td><img src="Hotrack.jpg" alt="hotrack" /></td>
        <td><img src="shir.jpg" alt="shir" /></td>

        <td><img src="" alt="Poppy" /></td>
        <td><img src="" alt="Poppy" /></td>
        <td><img src="" alt="Poppy" /></td>
        <td><img src="" alt="Poppy" /></td>

    </tr>

</table>

Picture for illustration:

http://postimg.org/image/osfwnnmxv/


Solution

  • Split it into 2 tables:

    <table class="photos" style="border-spacing: 0; border-width: 0; padding: 0 0; border-width: 0;  border: 1; width: 100%;" >
        <tr>
            <td><img src="Dad.jpg" alt="dad" /></td>
            <td><img src="gili.jpg" alt="gili" /></td>
            <td><img src="me2.jpg" alt="me" /></td>
        </tr>
    </table>
    <table class="photos" style="border-spacing: 0; border-width: 0; padding: 0 0; border-width: 0;  border: 1; width: 100%;" >
        <tr style="border-collapse: collapse;">
            <td><img src="Hotrack.jpg" alt="hotrack" /></td>
            <td><img src="shir.jpg" alt="shir" /></td>
    
            <td><img src="" alt="Poppy" /></td>
            <td><img src="" alt="Poppy" /></td>
            <td><img src="" alt="Poppy" /></td>
            <td><img src="" alt="Poppy" /></td>
    
        </tr>
    
    </table>