1.

Solve : IMG within a cell align?

Answer»

Hello

Been at this for an hour now but can't seem to get an image to align properly inside a table cell:



As you can see, I'm getting a large MARGIN above/below the cell where I've entered the image, if I remove the image the cell is perfect (like the cells below)

HTML I'm using:

Code: [Select]<td class="gridflag"&GT; <img width="15" height="10" align="left" valign="middle" src="img/flags/euro.gif" /> <p style="color:#FFFFFF; text-align:left">9</p></td>
CSS:

Code: [Select].gridflag {
background: #0E0E0E;
border: SOLID 1px #1D1D1D;
padding: 1px;
margin: 0px;
font-size: x-small;
font-family: TAHOMA;
vertical-align: middle;
letter-spacing: normal;
text-align: center;
line-height: 9px;
text-indent: 1px;}
Please help  Only taken a quick look but - if image 10px high and you have css saying 1px padding then - is this just too much for the cell to hold without expanding vertically?  Plus you have font x-small too.

Just wondering if making image smaller might help or enlarge font size.  Not sure right now if line-height is another factor - but too late in day to GO any further!



Discussion

No Comment Found