On 21/02/2015 18:44, Philippe Wittenbergh wrote:
Le 21 févr. 2015 à 12:26, Tim Dawson <[email protected]> a écrit
:
I have a problem which is presenting in both Firefox and Chrome
(others not tried), but only on my local Apache server. When
looking at the same page on the remote server it is OK.
http://holidaymullandiona.com/flexdemo/index.php
What I get is a part of the header background showing under the
header image, in a strip about two pixels high, so it LOOKS like a
2px border under the image. But it's definitely the background
peeping out under the image, as it changes colour with
'background-color' and setting img border to '0' has no effect.
Are you sure that the file on your local server and the file on the
'live' server are identical? One thing I noticed is that the file at
the URL above lacks a doctype, and thus displayed in quirksmode. In
that case you won’t see that 2px strip of background colour.
In strict mode (with a doctype as a start of the html document) you
*will* see that 2~3px strip. Basically, an image is an inline element
and as such rest on the baseline of the text. The 2~3px strip is the
space reserved for descenders that go under the baseline (characters
such as p, q, j, etc). Solution to your problem: set the image to
display: block.
Have fun, Philippe -- Philippe Wittenbergh http://l-c-n.com/
Thank you. The doctype was the only difference between the files (how
did I miss that ?), and display: block; solved the problem of course.
I'll know for another time.
So back to 'flex'; it has been causing me problems in older Android
browsers, which I'm working through.
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/