Forum Moderators: not2easy

Message Too Old, No Replies

Image margin border error in FF and Opera

         

johnno123

10:36 am on Apr 29, 2007 (gmt 0)

10+ Year Member



I've uploaded an example of a problem I'm having with FF2 and Opera in
displaying images with borders. The bottom border doesn't align with the
bottom of the image. It works fine in IE7.

A page with an example of the problem is here:
<snip>

As you can see I'm using a Strict 4.01 Doctype because I require that
Doctype for other content on my actual page to work properly.

Is anyone aware of a way to make this work in FF and Opera without resorting
to a Transitional Doctype?

Many thanks

--
John F
Studio8 XPproSP2

[edited by: Robin_reala at 12:52 pm (utc) on April 29, 2007]
[edit reason] Removing URL as per TOS #13 [webmasterworld.com] [/edit]

encyclo

3:41 pm on Apr 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld johnno123. :)

In full standards-compliance mode (strict doctype in FF and Opera), images are inline elements, not block elements. As such, there remains space for the descender of any text.

You can fix the problem by specifying

display:block;
for the images in question.

johnno123

8:21 pm on Apr 29, 2007 (gmt 0)

10+ Year Member



Thank you. That solved the problem.