[thelist] CSS Image Spacing in IE/Firefox

Kasimir K evolt at kasimir-k.fi
Thu Aug 5 02:04:42 CDT 2004

Richard Davey wrote on 05/08/2004 1:35:
> Except there is a small (few pixels) gap between the images. If I
> remove the carriage-return and tabs between the two image DIV tags
> then the gap disappears.
> Does anyone know why it is including the carriage-returns and how to
> avoid it? Perhaps via CSS. I'm using Homesite and saving the file in
> the Unix file format, but it doesn't make a difference.

At http://www.w3.org/TR/1999/REC-html401-19991224/struct/text.html#h-9.1
we learn that tabs and line breaks are also white space, so they should 
be rendered as white space - the user agent has no way of knowing that 
you wanted nice looking code, not white space.

If you don't want to go the hack route, you just have to remove any 
white space, including line breaks and tabs.

tell how to deal with code formating in Home Site (I'm not Home Site 
user myself so I can't tell you more)

I used to have similar problems when I used Dreamweaver - it often 
insisted on adding line breaks and other white space. Now I'm using 
PHPEdit ( http://www.waterproof.fr/ ) and have no more problems - 


More information about the thelist mailing list