Forum Moderators: open

Message Too Old, No Replies

Gaps between images in XHTML

         

adder

10:22 am on Jul 8, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi,

I needed to convert a page to XHTML, it is actually very simple at the top there is a table with two rows housing an image cut in two bits.

When adding the XHTML doctype, a horizontal gap appears between both table rows. Remove the doctype, it disappears. Magic!

The silly thing is that the code validates, that's why I have no suggestions where to start and what to fix.

Any ideas much appreciated.

adder

11:11 am on Jul 8, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



Aah, don't bother. I added style="display:block;" to img tags. Should be OK now.

penders

1:18 pm on Jul 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



FYI... Images are inline elements by default and consequently (in standards compliant mode, not just XHTML) sit on the baseline of the surrounding text (or imaginary baseline if there is no text). The gap below the image is the space below the baseline - the space for any descenders (tail of the 'g', 'y' etc.).

adder

11:05 am on Jul 10, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



penders, eh, that's interesting. I thought it was just another FireFox error.

Fotiman

5:35 pm on Jul 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I thought it was just another FireFox error.

"another" error? What's the other one?