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

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -