Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: IMG within a cell align  (Read 2808 times)

0 Members and 1 Guest are viewing this topic.

neljan

    Topic Starter


    Adviser

    Thanked: 1
    • Yes
  • Experience: Familiar
  • OS: Windows XP
IMG within a cell align
« on: November 19, 2009, 12:24:10 AM »
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"> <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  ???

ChrisXPPro



    Adviser

  • Forever Learning
  • Thanked: 4
    • ACB Systems
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: IMG within a cell align
« Reply #1 on: November 19, 2009, 06:30:47 PM »
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!
Ain't technology great - until it goes wrong!