Tout, J'ai le code suivant:
<span style="width:450px; height:207px; display:inline-block; vertical-align:middle; padding:0 0 0 10px; text-align:left;"> <b>Recipe Added By:</b> Test Person<br> <b>Prep Time:</b> aljsdf<br> <b>Cook Time:</b> asldfjdsf<br> <b>Recipe Yield:</b> asflja<br> <b>Recipe Category:</b> Main Dish </span>
4 Réponses :
Utiliser dans le style d'envoi Hauteur de ligne: 207px Code> Pour aligner verticalement. P>
Yup, cela, mais je pense qu'il voulait dire span code> et non
div code>. Et éloignez-vous également des
code> et
code> les balises et remplacez-les par
code> et de marge / remplissage respectivement.
Utilisez un DIV et Affichage: Cellule de table CODE>
<div style="width:450px; height:207px; display:table-cell; vertical-align:middle; padding:0 0 0 10px; text-align:left;border:1px solid #ff0000">
<b>Recipe Added By:</b> Test Person<br>
<b>Prep Time:</b> aljsdf<br>
<b>Cook Time:</b> asldfjdsf<br>
<b>Recipe Yield:</b> asflja<br>
<b>Recipe Category:</b> Main Dish
</div>
Cela l'obtiendra. J'ai ajouté une bordure pour le rendre plus visible.
<style> span { width: 450px; height: 207px; display: table-cell; padding-left: 10px; text-align: left; vertical-align: middle; } </style> <span> <b>Recipe Added By:</b> Test Person<br> <b>Prep Time:</b> aljsdf<br> <b>Cook Time:</b> asldfjdsf<br> <b>Recipe Yield:</b> asflja<br> <b>Recipe Category:</b> Main Dish </span>