image - HTML Table Cell Width with Photo - Cross Browser -
i have following html code: trying show image , under image show text in table cell. example:
<table bgcolor="yellow" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> <img width="100%" src="http://eofdreams.com/data_images/dreams/cat/cat-01.jpg" border="0" style="vertical-align: top;"/> <br/> <div style="background-color: #023f7d"> <p>test</p> </div> </td> </tr> </table>
the code above leaves yellow vertical stripe @ right of image. image not cover whole td.
if put width="100%" in img tag problem yellow stripe appears under photo. happens in ie (in safari works fine). want show div under photo without space.
what doing wrong ?
the problem <p>
tag default has margins. have overwrite adding margin: 0 <p>
tag clears margin that.
Comments
Post a Comment