Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Bizarre problem with image in table cell

I'm having a weird problem with a table cell that has an image in it.

The very first thing in the <BODY> of all of my pages is a 1x1 table; the cell contains an <IMG> and nothing else.

Using IE 6, I noticed that the image looked fine on my index.html page, but on other pages (fog000*.html) the image was shifted over to the right by a few pixels. When I looked at the source HTML, I noticed that all the pages that exhibited this problem began with:
<!-- Published by Fog Creek Software CityDesk ADRCMJYMILSGBELM/80ADD37D/7 -->
My index.html is the only page that doesn't begin with this comment.

When I manually removed the comment and reloaded the page, the image scooted back to the left, where it was supposed to be.

Now, I'm no HTML expert, but this seems like a bug in IE 6. (I don't know if other browsers have the same problem.) But is there any way to suppress this leading comment? Can you at least put at at the end of the document? Does it only appear in the Starter Edition? If I pay will it go away?


Steve C.
Thursday, January 31, 2002

It doesn't go away and you can't turn it off because its used for when you hit edit in IE so citydesk knows what page you want to edit.  (There has to be a way to associate the published page with the unpublished article in the .cty file - thats what all those funny chars are).

I suspect IE is doing that because the comment is not inside any html code. It's the first thing on the page (it has to be otherwise we might muck up your html code).

A stylesheet might fix this though...
Try this..

body        /* the entire body */
    margin-left:        0px;
    margin-top:        0px;

in the <head> tag

Michael H. Pryor
Thursday, January 31, 2002

Thanks for the quick reply, but I'm sorry to say that that didn't help. I did find a different way to fix my problem, however. I added the attributes HSPACE=0 VSPACE=0 to my <IMG> tag. I still blame IE for this, but it seems odd to me that just having a comment as the very first thing in my document could cause this.

I also noticed two other minor problems while I was working:

1. I added the HSPACE and VSPACE attributes in HTML mode; when I switched to Normal view and back to HTML, the VSPACE attribute was gone (but HSPACE was still there, oddly enough).
2. In the Templates dialog box, both the "New articles..." field and the "Done" button use N as an accelerator. (Can you tell I'm a keyboard freak?)

Thanks again.

Steve C.
Friday, February 1, 2002

My guess is that for VSPACE, 0 is the default, so VSPACE=0 has no effect and is removed by the editor. (If you set VSPACE=1, it is preserved.) Let me know if I'm wrong about this.

I'll fix the accelerator problem, thanks!

Joel Spolsky
Friday, February 1, 2002

*  Recent Topics

*  Fog Creek Home