> When the answer was to delete space between the tags, I was
> shocked...but loading the source code and removing the spaces worked
> as advertised. Why does that white space count?  

It's because images are inline elements.  Essentially, HTML treats an image as 
if it were a letter (that's what being "inline" means).

So if you had code like:

<p>
a
a
a
a
</p>

You would expect your output to be "a a a a", not "aaaa".  With images, it's 
the same.  As a result, I find that it's usually more useful to add img 
{display:block} to my style sheet, because images have borders, and padding, 
and margins, and height, and width, which inline elements don't have, but 
block elements do.

The reason they're inline, i think, is that like letters (and unlike divs) 
images have inherent dimensions (the image has a predefined "natural" size).

---Tim
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to