Maintenant, j'ai un élément span je lui donne la largeur et la hauteur par exemple 500px Je connais l'élément inline donc il n'accepte pas la largeur et la hauteur, mais pourquoi il s'applique quand je le flotte?Pourquoi un élément en ligne accepte-t-il la largeur et la hauteur lorsqu'il est flottant?
span.first {
width: 500px;
height: 500px;
border: 1px solid #000;
float: right;
}
span.second {
width: 500px;
height: 500px;
border: 1px solid #000;
}
<span class="first">with float</span>
<span class="second">without float</span>
https://codepen.io/kemozzz/pen/KvVrXj
Besoin d'informations ... Afficher un exemple de code, etc. – Cagy79