PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > IE8 Table TD tag and font-size - bug or standard compliant?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
IE8 Table TD tag and font-size - bug or standard compliant?

Réponse
 
LinkBack Outils de la discussion
Vieux 01/04/2008, 17h43   #1 (permalink)
jamieb
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut IE8 Table TD tag and font-size - bug or standard compliant?

Not sure if this is the right spot to post this question or not.
Please let me know.

I've searched high and low for some info about this, but I can't find
anything.

Testing in IE8, I've come across a problem where HTML such as the
following does not work as expected:

<html>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td background="1x1.gif"><img src="1x1.gif" border="0"></td>
</tr>
</table>
</body>
</html>

1x1.gif is, as the filename suggests, a 1 pixel gif image. I'd expect
that the TR row would be 1 pixel in height, for the width of the
browser window, but it is not. The only way I can make this row 1
pixel in height is to specify a font-size of 1px or smaller in a style
attribute of the TD element (or remove the img tag within the TD).

Both firefox (latest) and IE7 work as I'd expect them to. Do you
think this is a defect in IE8 or just a part of IE8's new standards
compliance? If I switch to a mode other than Standard through the IE8
developer tool (quirks mode, for example), things are fine.
  Réponse avec citation
Vieux 01/04/2008, 19h02   #2 (permalink)
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: IE8 Table TD tag and font-size - bug or standard compliant?

On 2008-04-01, jamieb <jamie.beach@gmail.com> wrote:
> Not sure if this is the right spot to post this question or not.
> Please let me know.
>
> I've searched high and low for some info about this, but I can't find
> anything.
>
> Testing in IE8, I've come across a problem where HTML such as the
> following does not work as expected:
>
><html>
> <body>
> <table border="0" width="100%" cellspacing="0" cellpadding="0">
> <tr>
> <td background="1x1.gif"><img src="1x1.gif" border="0"></td>
> </tr>
> </table>
> </body>
></html>
>
> 1x1.gif is, as the filename suggests, a 1 pixel gif image. I'd expect
> that the TR row would be 1 pixel in height, for the width of the
> browser window, but it is not. The only way I can make this row 1
> pixel in height is to specify a font-size of 1px or smaller in a style
> attribute of the TD element (or remove the img tag within the TD).
>
> Both firefox (latest) and IE7 work as I'd expect them to. Do you
> think this is a defect in IE8 or just a part of IE8's new standards
> compliance? If I switch to a mode other than Standard through the IE8
> developer tool (quirks mode, for example), things are fine.


Are you sure you're getting Firefox in strict mode? I would expect the
td to be higher than 1px since it contains an inline image which is
aligned to the baseline of the td.

There should therefore be a gap below the image equal to the font
descent of the td's font.

Set display: block (or vertical-align: bottom) on the img and it should
work as expected in strict mode in all conforming browsers.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h44.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08085 seconds with 10 queries