Mon code est il bon ?
Résolu
euuuh
Messages postés
58
Date d'inscription
Statut
Membre
Dernière intervention
-
alex59fr Messages postés 853 Date d'inscription Statut Membre Dernière intervention -
alex59fr Messages postés 853 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Juste une question : Mon code est-il bon sachant que je désire que les deux images encadrent mon texte ?
HTML :
<body>
<p align="center">
<img src="http://nomdemonsite.free.fr/image/titre.bmp"
alt="titre"><img
src="http://nomdemonsite.free.fr/images/menu.jpg"
alt="Menu"></p>
<img class="floatleft"
src="http://nomdemonsite.free.fr/images/rallye.acc.bmp"
alt="Rallye"><img class="floatright"
src="http://nomdemonsite.free.fr/images/concert.acc.bmp"
alt="Concert">Bienvenue chez ... (mon texte) :<br>
Des ... (encore du texte)<br>
Du ... (texte;)<br>
Une... (encore du texte)<br>
Un ... (et du texte;)
<p> [...]
<body/>
Code CSS:
body{
background-color: #363636;
color: white;
font-size: large;
font-family: Century Gothic, Verdana, Trebuchet MS, Comic Sans MS, Georgia, serif;
text-align: center
}
.floatleft{
float: left;
padding: 2%;
margin-top: -170px;
margin-bottom: 10px;
margin-right: 0px;
width: 234px;
height: 156px;
}
.floatright{
float: right;
padding: 2%;
margin-top: -170px;
margin-left: 735px;
margin-bottom: 10px;
width: 228px;
height: 156px;
}
D'avance Merci beaucoup
Juste une question : Mon code est-il bon sachant que je désire que les deux images encadrent mon texte ?
HTML :
<body>
<p align="center">
<img src="http://nomdemonsite.free.fr/image/titre.bmp"
alt="titre"><img
src="http://nomdemonsite.free.fr/images/menu.jpg"
alt="Menu"></p>
<img class="floatleft"
src="http://nomdemonsite.free.fr/images/rallye.acc.bmp"
alt="Rallye"><img class="floatright"
src="http://nomdemonsite.free.fr/images/concert.acc.bmp"
alt="Concert">Bienvenue chez ... (mon texte) :<br>
Des ... (encore du texte)<br>
Du ... (texte;)<br>
Une... (encore du texte)<br>
Un ... (et du texte;)
<p> [...]
<body/>
Code CSS:
body{
background-color: #363636;
color: white;
font-size: large;
font-family: Century Gothic, Verdana, Trebuchet MS, Comic Sans MS, Georgia, serif;
text-align: center
}
.floatleft{
float: left;
padding: 2%;
margin-top: -170px;
margin-bottom: 10px;
margin-right: 0px;
width: 234px;
height: 156px;
}
.floatright{
float: right;
padding: 2%;
margin-top: -170px;
margin-left: 735px;
margin-bottom: 10px;
width: 228px;
height: 156px;
}
D'avance Merci beaucoup
A voir également:
- Mon code est il bon ?
- Code ascii - Guide
- Code puk bloqué - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code activation windows 10 - Guide
- Code blocks - Télécharger - Langages
6 réponses
<body> <p align="center"> <img src="http://nomdemonsite.free.fr/image/titre.bmp" alt="titre"><img src="http://nomdemonsite.free.fr/images/menu.jpg" alt="Menu"></p> <img class="floatleft" src="http://nomdemonsite.free.fr/images/rallye.acc.bmp" alt="Rallye"><img class="floatright" src="http://nomdemonsite.free.fr/images/concert.acc.bmp" alt="Concert">Bienvenue chez ... (mon texte) :<br> Des ... (encore du texte)<br> Du ... (texte;)<br> Une... (encore du texte)<br> Un ... (et du texte;) <p> [...] <body/>
C'est pas ta page ça j'espère ?
Correction car il y a énormément d'erreur (plus alignement des images)
<body> <div style="display:block;"> <p align="center"> <img src="/image/titre.bmp" alt="titre" /><img src="/images/menu.jpg" alt="Menu" /> </p> <img class="floatleft" src="/images/rallye.acc.bmp" alt="Rallye" /> <img class="floatright" src="/images/concert.acc.bmp" alt="Concert" /> Bienvenue chez ... (mon texte) :<br /> Des ... (encore du texte)<br /> Du ... (texte;)<br /> Une... (encore du texte)<br /> Un ... (et du texte;) <p> </div> <body/>
le CSS :
body{ background-color: #363636; color: white; font-size: large; font-family: Century Gothic, Verdana, Trebuchet MS, Comic Sans MS, Georgia, serif; text-align: center } .floatleft{ float: left; display:inline; padding: 2%; margin-bottom: 10px; margin-right: 0px; width: 234px; height: 156px; } .floatright{ float: right; display:inline; padding: 2%; margin-bottom: 10px; width: 228px; height: 156px; }
ça devrai fonctionner comme ça :)
mais sais tu comment faire pour éviter que mes deux images qui doivent encadrés mon texte ne soient pas en décalé avec le texte mais à ses côtés : https://forums.commentcamarche.net/forum/affich-15597029-css-et-images-mes-codes-sont-ils-bon#7
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question