Search code examples
asp.nethtmlmarquee

Asp: Wrap image inside a Table


what I'm trying to do is create a marque of images going up to down Here is my code

<table>
<tr>
<td></td>
<td style="table-layout:fixed;border-collapse:collapse;">
<marquee direction="down">
<table >
<tr>
<td>
<img src="../Advertise/Add1.jpg" />
</td>
</tr>
<tr>
<td>
<img src="../Advertise/Add2.jpg" />
</td>
</tr>
<tr>
<td>
<img src="../Advertise/Add3.jpg" />
</td>
</tr>
</table></marquee>
<td/>
</tr>
</table>
Add1,Add2,Add3 are inside a folder   

Now the problem is the size of the image was same as it is actually

i want to wrap it according to the size of my <td>

please give me suggestions how to do it
thanks in advance.


Solution

  • set height and width to 100% as mentioned below :

    <img src="../Advertise/Add1.jpg" style="height:100%;width:100%" />
    

    HTML:

    <table>
        <tr>
            <td></td>
            <td style="table-layout: fixed; border-collapse: collapse;">
                <marquee direction="down">
                    <table>
                    <tr>
                    <td>
                    <img src="../Advertise/Add1.jpg" style="height: 100%;width: 100%" />
                    </td>
                    </tr>
                    <tr>
                    <td>
                    <img src="../Advertise/Add2.jpg" style="height: 100%;width: 100%" />
                    </td>
                    </tr>
                    <tr>
                    <td>
                    <img src="../Advertise/Add3.jpg" style="height: 100%;width: 100%" />
                    </td>
                    </tr>
                    </table>
                </marquee>
            </td>
        </tr>
    </table>