> Adam Olejniczak wrote:
>
> Hello
>
> I have one but rally annoing problem with mozilla:
>
> see the attached html file
>
> there are 2 images one under other and notice then right now there is no
> space between them
> but when you uncommend the header to make the page HTML4.01 compatible
> and you will reload the page
> you will see that the spaces between images !?
>
> and the question is qhy it is so ? and if it's a bug ?
As Henri explained, this is not a bug. It actually takes into account
both the CSS2 line model, and the fact that 'align' defaults to
'baseline' in HTML.
Try adding
<style type="text/css">
IMG {
vertical-align: bottom;
}
</style>
to the <head> of the affected document to override this default.
Unless your images are shorter than the line height, that will fix it.
The reason this happens when you change the DOCTYPE is because
Mozilla has two rendering modes: Quirks and Standard.
The Quirks mode attempts to emulate various bugs and non-standard
peculiarities of older browsers.
The Standard mode strictly follows the HTML and CSS standards.
An HTML 4.01 Transitional DOCTYPE with a URI triggers Standard mode.
If you want to continue with Quirks mode, remove the URI:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">