2008-12-23 7 views
1

J'ai une page avec ce HTML:texte IE n'enroulant autour des images

<p> 
    <img src="images/ih01.jpg" width="80" height="110" align="left" /> 
    This course overs basic human anatomy and physiology, including the major 
    body systems and their functions. When you have completed this course you 
    will be able to identify major body components and their core physiological 
    functions. 
</p> 

Et voici comment il affiche dans Firefox 3, Chrome 1.0 et IE7: (Cliquez pour agrandir)

http://fisher.spadgos.com/stuff/ie-align-fail.png

Vous pouvez voir qu'IE n'emballe pas le texte autour de l'image même s'il est aligné à gauche. Des idées?

Répondre

7

Utilisation:

<img src="images/ih01.jpg" style="float: left; height: 110px; width: 80px; " > 

au lieu d'aligner. L'attribut align est deprecated.

+0

Man, je n'ai jamais su que IE7 a cessé de supporter l'alignement. À votre santé. – nickf

+0

Vous m'avez battu comme 2 secondes. – Triptych

2

Tout d'abord, "align" est déconseillé. Vous voudrez utiliser la propriété flottante CSS ici.

<p> 
    <img src="images/ih01.jpg" style="float:left;height:110px;width:80px" />  
    This course overs basic human anatomy and physiology, including the major 
    body systems and their functions. When you have completed this course you 
    will be able to identify major body components and their core physiological 
    functions. 
</p> 

Il est temps de prendre un "temps mort" à learn about floats!

+0

hehe Je connais flotteurs et CSS - c'est le code de notre CMS qu'un non techie créé avec un WYSIWYG, et j'espérais pouvoir éviter de réécrire tout ce code! – nickf

+0

Ahh mon vieil ami l'éditeur WYSIWYG ... – alex

+0

Ah, WYSIWYG web éditant dans les jours avant DIVs et CSS. Je dois l'aimer. –