J'ai donc travaillé sur une page avec du texte et une image. Cependant, je ne peux pas trouver un moyen de mettre l'image entre le texte. soit il reste en haut à gauche, soit il ne se centre que horizontalement. voici le code qui est d'importance:comment aligner une image entre un texte?
<style>
body {
margin: 0;
background-image: url("rainbowbg.png");
}
div #hype {
margin-left: auto;
margin-right: auto;
display: block;
positon: relative;
}
#hypetop {
position: fixed;
top: 0;
width: 100%;
}
#hypebot {
position: fixed;
bottom: 0;
width: 100%;
}
.hypetext {
font-family: Impact, Charcoal, sans-serif;
font-size: 64px;
text-align: center;
}
</style>
<body>
<div>
<h1 class="hypetext" id="hypetop">DIRE</h1>
<img id="hype" src="DIREHYPE.png" width="224" height="224">
<h1 class="hypetext" id="hypebot">HYPPPPPPPPPPPE</h1>
</div>
</body>
Si quelqu'un sait comment je pourrais obtenir l'image centrée entre le texte, ce serait génial.
merci. Cela a fonctionné parfaitement pour moi. –
Votre bienvenue chérie. – Developer