Forum Moderators: open

Message Too Old, No Replies

Ghost image?

couldn't get rid of blank around a image

         

newbies

5:34 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



Hi,

I have a one cell table which hold a image. initially it worked fine, but after I applied source code formatting, there is always a blank area under the image (my images doesn't have a white border). I tried put valign=bottom in <td>, <tr>, <table> and <img> tag, and specify table and cell height exactly the same as the image, it makes no difference. I tried change the image name, disable CSS, no use. Then I create a new page with just this table, the problem still there.

Strange enough, this occurs to IE, Netscape, but not to Opera and Frontpage preview.

It got me mad, could somebody help me out?

thank you very much!

newbies

john_k

5:55 pm on Apr 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If there are any other cells in the row, then you probably need to add a <br/> tag after the image tag:


<td><img src="something.gif" width="12" height="12"><br/></td>

Unfortunately, that will probably add whitespace after the image in non-mozilla based browsers.

newbies

6:46 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



Thanks for the reply.

I have to use align=absbottom in the img tag. it solved the problem. This is very stange.

keyplyr

5:50 am on Apr 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Here's a tutorial explaining this phenomena: Images, Tables, and Mysterious Gaps [devedge.netscape.com]

newbies

6:56 am on Apr 10, 2004 (gmt 0)

10+ Year Member



thanks keyplyr for the great article on exact my problem. Now I realized why after I applied source code formatting, the problem occured because it added DOCTYPE to the html code.