[css][help] répéter une image
Fermé
jolfl
Messages postés
8
Date d'inscription
dimanche 22 avril 2007
Statut
Membre
Dernière intervention
3 octobre 2011
-
Modifié par jolfl le 3/10/2011 à 12:33
arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 - 4 oct. 2011 à 12:37
arthezius Messages postés 3538 Date d'inscription jeudi 15 mai 2008 Statut Membre Dernière intervention 11 septembre 2016 - 4 oct. 2011 à 12:37
A voir également:
- [css][help] répéter une image
- Image iso - Guide
- Légender une image - Guide
- Comment agrandir une image - Guide
- Acronis true image - Télécharger - Sauvegarde
- Telecharger une image disque windows 10 fichier iso - Guide
5 réponses
arthezius
Messages postés
3538
Date d'inscription
jeudi 15 mai 2008
Statut
Membre
Dernière intervention
11 septembre 2016
475
3 oct. 2011 à 12:47
3 oct. 2011 à 12:47
Tu peux mettre un div devant ton background et mettre ta seconde image en fond de celui-ci. Le tout en CSS.
Lord Zero
Messages postés
459
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
15 juin 2018
115
3 oct. 2011 à 12:56
3 oct. 2011 à 12:56
Je suis de l'avis d'Arthezius
<div style="width:800px;height: 162px;background:url('url de l'image') repeat-x"></div>
jolfl
Messages postés
8
Date d'inscription
dimanche 22 avril 2007
Statut
Membre
Dernière intervention
3 octobre 2011
3 oct. 2011 à 13:02
3 oct. 2011 à 13:02
Merci de vôtre aide mais ça ne s'affiche toujours pas , est ce que j'ai fait des erreur ?
HTML :
<div class="text2"><div style="width="200" height="560";background:url('images/text2.jpg') repeat-x"/ ></div> </div>
CSS :
.text2
{
position:absolute;
z-index:17;
left:1500px;
top: 480px;
margin-left:-320px;
margin-top:-50px;
}
HTML :
<div class="text2"><div style="width="200" height="560";background:url('images/text2.jpg') repeat-x"/ ></div> </div>
CSS :
.text2
{
position:absolute;
z-index:17;
left:1500px;
top: 480px;
margin-left:-320px;
margin-top:-50px;
}
Lord Zero
Messages postés
459
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
15 juin 2018
115
3 oct. 2011 à 13:07
3 oct. 2011 à 13:07
oui enorme erreur même
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-x"></div></div>
jolfl
Messages postés
8
Date d'inscription
dimanche 22 avril 2007
Statut
Membre
Dernière intervention
3 octobre 2011
3 oct. 2011 à 13:35
3 oct. 2011 à 13:35
J'ai résolue mon erreur ,mais toujours aucun repeat, je met mon humble
css :
{
background-color:#fffff;
background-image:url('images/background.png');
background-repeat:repeat-x;
background-attachment:scroll
}
.text2
{
position:absolute;
z-index:17;
left:1500px;
top: 480px;
margin-left:-320px;
margin-top:-50px;
}
html :
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-x"></div></div>
Une petite aide ?
css :
{
background-color:#fffff;
background-image:url('images/background.png');
background-repeat:repeat-x;
background-attachment:scroll
}
.text2
{
position:absolute;
z-index:17;
left:1500px;
top: 480px;
margin-left:-320px;
margin-top:-50px;
}
html :
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-x"></div></div>
Une petite aide ?
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Lord Zero
Messages postés
459
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
15 juin 2018
115
Modifié par Lord Zero le 3/10/2011 à 13:42
Modifié par Lord Zero le 3/10/2011 à 13:42
verifie bien ton css,
avec les valeur negative tu risque de mettre ta div en dehors de l'écran .
Pourquoi left et margin left?
Développeur VB6, VBS, VBA, VB.NET, C#, HTML, PHP, JAVASCRIPT, SQL.
left:1500px; top: 480px; margin-left:-320px; margin-top:-50px;
avec les valeur negative tu risque de mettre ta div en dehors de l'écran .
Pourquoi left et margin left?
Développeur VB6, VBS, VBA, VB.NET, C#, HTML, PHP, JAVASCRIPT, SQL.
Lord Zero
Messages postés
459
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
15 juin 2018
115
3 oct. 2011 à 13:46
3 oct. 2011 à 13:46
si ton background fait 200x560, pour en avoir plusieurs cote a cote, il faut multiplier la longueur par le nombre de fois ou tu veux cette image.
Lord Zero
Messages postés
459
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
15 juin 2018
115
3 oct. 2011 à 13:47
3 oct. 2011 à 13:47
<div class="text2"><div style="width:800px; height:560px;background:url('images/text2.jpg') repeat-x"></div></div>
style
.text2 { position:absolute; top: 480px; margin-left:220px; }
jolfl
Messages postés
8
Date d'inscription
dimanche 22 avril 2007
Statut
Membre
Dernière intervention
3 octobre 2011
3 oct. 2011 à 13:48
3 oct. 2011 à 13:48
côté background j'ai pas de soucis, simplement j'aimerai pouvoir faire un repeat sur cette image pour qu'elle continue comme sur l'exemple 2 en haut
arthezius
Messages postés
3538
Date d'inscription
jeudi 15 mai 2008
Statut
Membre
Dernière intervention
11 septembre 2016
475
3 oct. 2011 à 21:14
3 oct. 2011 à 21:14
Remplace simplement:
par:
Et côté CSS:
Si tu mets left:1500px;, ton bloc est à 1500px vers la droite. Autrement dit, il est hors écran dans mon cas (mon écran étant à 1440px et donc chez la majorité des gens).
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-x"></div></div>
par:
<div class="text2"> </div>
Et côté CSS:
.text2 { position:absolute; z-index:17; width:800px; height:560px; margin:0px auto; background:url('images/text2.jpg') repeat-x; }
Si tu mets left:1500px;, ton bloc est à 1500px vers la droite. Autrement dit, il est hors écran dans mon cas (mon écran étant à 1440px et donc chez la majorité des gens).
Autre erreur: vous êtes fâché avec les points virgules hors un ";" doit terminer toute propriétés CSS, c'est pas pour faire beau c'est pour lui indiquer la fin de la ligne sinon il buggues.
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-xICI"></div></div>
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-x;"></div></div>
et
{
background-color:#fffff;
background-image:url('images/background.png');
background-repeat:repeat-x;
background-attachment:scrollICI
}
Pas de nom de classe devant est ce une erreur de copié collé?
.machin{
background-color:#fffff;
background-image:url('images/background.png');
background-repeat:repeat-x;
background-attachment:scroll;
}
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-xICI"></div></div>
<div class="text2"><div style="width:200px; height:560px;background:url('images/text2.jpg') repeat-x;"></div></div>
et
{
background-color:#fffff;
background-image:url('images/background.png');
background-repeat:repeat-x;
background-attachment:scrollICI
}
Pas de nom de classe devant est ce une erreur de copié collé?
.machin{
background-color:#fffff;
background-image:url('images/background.png');
background-repeat:repeat-x;
background-attachment:scroll;
}