Home / Internet & Networking / Web design / IMG within a cell align
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: IMG within a cell align  (Read 538 times)
neljan
Topic Starter
Adviser



Thanked: 1
Posts: 712


« 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  ???
IP logged

I have thanked people, but for some reason my total is still 0 :|
ChrisXPPro
Adviser



Thanked: 3
Posts: 764

Forever Learning

ACB Systems
« 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!
IP logged

Ain't technology great - until it goes wrong!
Pages: [1] - (Top) Print 
Home / Internet & Networking / Web design / IMG within a cell align « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.064 seconds with 20 queries.