Problème d'image de fond avec easy php
Dernière réponse : dans Programmation
Bonjour à toute et à tous, voila j'ai un petit souci avec mon image de fond pour le site web que je suis entrain de créer.
Mon problème est que mon image de fond était nikel jusqu'au moment ou je rajoute quelque fonction supplémentaire, là mon image de fond se décale toute seule vers la droite me laissant une page blanche avec mon entête et mes 2 marge a la position que je souhaite.
Voici mes codes (HTML et CSS), dites moi si vous voyer un truc qui cloche s'il vous plait.
merci beaucoup de vos aides
code HTML:
code CSS:
Mon problème est que mon image de fond était nikel jusqu'au moment ou je rajoute quelque fonction supplémentaire, là mon image de fond se décale toute seule vers la droite me laissant une page blanche avec mon entête et mes 2 marge a la position que je souhaite.
Voici mes codes (HTML et CSS), dites moi si vous voyer un truc qui cloche s'il vous plait.
merci beaucoup de vos aides
code HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmtns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>" xml:lang="fr">
<head><link href="page_menu.css" type="text/css" rel="stylesheet" />
<meta http-equiv="Content-Type" content="text/HTML; charset=iso-8859-1" />
<style type="text/css">
#alliance {
padding: 0;
margin: 0;
width: 240px;
height: 240px;
}
.alliance {
background: url(alliance.jpg) no-repeat;
}
.alliance:hover {
background: url(alliancex.jpg) no-repeat;
}
#humaine {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.humaine {
background: url(logo_humaine.jpg) no-repeat;
}
.humaine:hover {
background: url(humainex.jpg) no-repeat;
}
#gnominette {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.gnominette {
background: url(logo_gnominette.jpg) no-repeat;
}
.gnominette:hover {
background: url(gnominettex.jpg) no-repeat;
}
#elfeF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfeF {
background: url (logo_elfette de la nuit.jpg) no-repeat;
}
.elfeF:hover {
background: url (elfexF.jpg) no-repeat;
}
#draeneiF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.draeneiF {
background: url(logo_draeneiF.jpg) no-repeat;
}
.draeneiF:hover {
background: url(draeneixF.jpg) no-repeat;
}
#naine {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.naine {
background: url(logo_naine.jpg) no-repeat;
}
.naine:hover {
background: url(nainex.jpg) no-repeat;
}
#humain {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.humain {
background: url(logo_humain.jpg) no-repeat;
}
.humain:hover {
background: url(humainx.jpg) no-repeat;
}
#gnome {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.gnome {
background: url(logo_gnome.jpg) no-repeat;
}
.gnome:hover {
background: url(gnomex.jpg) no-repeat;
}
#elfeM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfeM {
background: url(logo_elfeM.jpg) no-repeat;
}
.elfeM:hover {
background: url(elfedelanuitx.jpg) no-repeat;
}
#draeneiM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.draeneiM {
background: url(logo_draeneiM.jpg) no-repeat;
}
.draeneiM:hover {
background: url(draeneixM.jpg) no-repeat;
}
#nain {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.nain {
background: url(logo_nain.jpg) no-repeat;
}
.nain:hover {
background: url(nainx.jpg) no-repeat;
}
#horde {
padding: 0;
margin: 0;
width: 240px;
height: 240px;
}
.horde {
background: url(horde.jpg) no-repeat;
}
.horde:hover {
background: url(hordex.jpg) no-repeat;
}
#orquesse {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.orquesse {
background: url(logo_orquesse.jpg) no-repeat;
}
.orquesse:hover {
background: url(orquexF.jpg) no-repeat;
}
#trollesse {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.trollesse {
background: url(logo_trollesse.jpg) no-repeat;
}
.trollesse:hover {
background: url(trollessex.jpg) no-repeat;
}
#taurenF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.taurenF {
background: url (logo_taurenF.jpg) no-repeat;
}
.taurenF:hover {
background: url (taurenxF.jpg) no-repeat;
}
#elfedesangF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfedesangF {
background: url(logo_elfette de sang.jpg) no-repeat;
}
.elfedesangF:hover {
background: url(elfedesangxF.jpg) no-repeat;
}
#mortevivante {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.mortevivante {
background: url(logo_morte-vivante.jpg) no-repeat;
}
.mortevivante:hover {
background: url(mortevivantex.jpg) no-repeat;
}
#orque {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.orque {
background: url(logo_orque.jpg) no-repeat;
}
.orque:hover {
background: url(orquexM.jpg) no-repeat;
}
#troll {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.troll {
background: url(logo_troll.jpg) no-repeat;
}
.troll:hover {
background: url(trollx.jpg) no-repeat;
}
#taurenM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.taurenM {
background: url(logo_taurenM.jpg) no-repeat;
}
.taurenM:hover {
background: url(taurenxM.jpg) no-repeat;
}
#elfedesangM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfedesangM {
background: url(logo_elfe de sang.jpg) no-repeat;
}
.elfedesangM:hover {
background: url(elfedesangxM.jpg) no-repeat;
}
#mortvivant {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.mortvivant {
background: url(logo_mort-vivant.jpg) no-repeat;
}
.mortvivant:hover {
background: url(mortvivantx.jpg) no-repeat;
}
</style>
<title>
</title>
</head>
<body>
</div>
</html>
<div id="page_entete">
</div>
<div id="marge_gauche">
<a href="alliance.html" class="alliance" id="alliance" img src="alliance.jpg" style="position:absolute; left:0px; top:101px;" />
<a href="humaine.html" class="humaine" id="humaine" img src="logo_humaine.jpg" style="position:absolute; left:75px; top:417px;"/>
<a href="gnominette.html" class="gnominette" id="gnominette" img src="logo_gnominette.jpg" style="position:absolute; left:75px; top:608px;"/>
<a href="elfe.html" class="elfeF" id="elfeF" img src="logo_elfette de la nuit.jpg" style="position:absolute; left:76px; top:545px;"/>
<a href="draeneiF.html" class="draeneiF" id="draeneiF" img src="logo_draeneiF.jpg" style="position:absolute; left:75px; top:671px;"/>
<a href="naine.html" class="naine" id="naine" img src="logo_naine.jpg" style="position:absolute; left:76px; top:481px;"/>
<a href="humain.html" class="humain" id="humain" img src="logo_humain.jpg" style="position:absolute; left:166px; top:417px;"/>
<a href="gnome.html" class="gnome" id="gnome" img src="logo_gnome.jpg" style="position:absolute; left:167px; top:608px;"/>
<a href="elfe.html" class="elfeM" id="elfeM" img src="logo_elfe de la nuit.jpg" style="position:absolute; left:166px; top:544px;"/>
<a href="draeneiM.html" class="draeneiM" id="draeneiM" img src="logo_draeneiM.jpg" style="position:absolute; left:166px; top:671px;"/>
<a href="nain.html" class="nain" id="nain" img src="logo_nain.jpg" style="position:absolute; left:166px; top:480px;"/>
</div>
<div id="marge_droite">
<a href="horde.html" class="horde" id="horde" img src="horde.jpg" style="position:absolute; right:0px; top:101px;" />
<a href="orquesse.html" class="orquesse" id="orquesse" img src="logo_orquesse.jpg" style="position:absolute; right:72px; top:414px;"/>
<a href="trolesse.html" class="trolesse" id="trolesse" img src="logo_trolesse.jpg" style="position:absolute; right:72px; top:605px;"/>
<a href="taurenF.html" class="taurenF" id="taurenF" img src="logo_taurenF.jpg" style="position:absolute; right:73px; top:542px;"/>
<a href="elfedesangF.html" class="elfedesangF" id="elfedesangF" img src="logo_elfette de sang.jpg" style="position:absolute; right:72px; top:668px;"/>
<a href="morte-vivante.html" class="mortevivante" id="mortevivante" img src="logo_morte-vivante.jpg" style="position:absolute; right:73px; top:478px;"/>
<a href="orque.html" class="orque" id="orque" img src="logo_orque.jpg" style="position:absolute; right:163px; top:414px;"/>
<a href="troll.html" class="troll" id="troll" img src="logo_troll.jpg" style="position:absolute; right:164px; top:605px;"/>
<a href="taurenM.html" class="taurenM" id="taurenM" img src="logo_taurenM.jpg" style="position:absolute; right:163px; top:541px;"/>
<a href="elfedesangM.html" class="elfedesangM" id="elfedesangM" img src="logo_elfe de sang.jpg" style="position:absolute; right:163px; top:668px;"/>
<a href="mort-vivant.html" class="mortvivant" id="mortvivant" img src="logo_mort-vivant.jpg" style="position:absolute; right:163px; top:477px;"/>
</div>
<div id="contenu">
</div>
<div id="page_pied">
</div>
</body>
code CSS:
body {
margin: 0;
text-align: center;
}
#body {
width: 1440px;
text-align: center;
background: #cccccc;
margin-left: 0;
margin-right: 0,5em;
}
#page_entete {
width:1440px;
height: 101px;
background-image:url(entete.jpg);
text-align: center;
clear: both;
}
#marge_gauche {
width:240px;
height:650px;
background-image:url(margeg.jpg);
float: left;
}
#alliance {
padding: 0;
margin: 0;
width: 240px;
height: 240px;
}
.alliance {
background: url(alliance.jpg) no-repeat;
}
.alliance:hover {
background: url(alliancex.jpg) no-repeat;
}
#humaine {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.humaine {
background: url(humaine.jpg) no-repeat;
}
.humaine:hover {
background: url(humainex.jpg) no-repeat;
}
#gnominette {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.gnominette {
background: url(logo_gnominette.jpg) no-repeat;
}
.gnominette:hover {
background: url(gnominettex.jpg) no-repeat;
}
#elfeF{
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfeF {
background: url (logo_elfette de la nuit.jpg) no-repeat;
}
.elfeF:hover {
background: url(elfexF.jpg) no-repeat;
}
#draeneiF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.draeneiF {
background: url(logo_draeneiF.jpg) no-repeat;
}
.draeneiF:hover {
background: url(draeneixF.jpg) no-repeat;
}
#naine {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.naine {
background: url(logo_naine.jpg) no-repeat;
}
.naine:hover {
background: url(nainex.jpg) no-repeat;
}
#humain {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.humain {
background: url(logo_humain.jpg) no-repeat;
}
.humain:hover {
background: url(humainx.jpg) no-repeat;
}
#gnome {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.gnome {
background: url(logo_gnome.jpg) no-repeat;
}
.gnome:hover {
background: url(gnomex.jpg) no-repeat;
}
#elfeM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfeM {
background: url(logo_elfeM.jpg) no-repeat;
}
.elfeM:hover {
background: url(elfedelanuitx.jpg) no-repeat;
}
#draeneiM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.draeneiM {
background: url(logo_draeneiM.jpg) no-repeat;
}
.draeneiM:hover {
background: url(draeneixM.jpg) no-repeat;
}
#nain {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.nain {
background: url(logo_nain.jpg) no-repeat;
}
.nain:hover {
background: url(nainx.jpg) no-repeat;
}
#marge_droite {
width:240px;
height:650px;
background-image:url(marged.jpg);
float: right;
}
#horde {
padding: 0;
margin: 0;
width: 240px;
height: 240px;
}
.horde {
background: url(horde.jpg) no-repeat;
}
.horde:hover {
background: url(hordex.jpg) no-repeat;
}
#orquesse {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.orquesse {
background: url(logo_orquesse.jpg) no-repeat;
}
.orquesse:hover {
background: url(orquexF.jpg) no-repeat;
}
#trollesse {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.trollesse {
background: url(logo_trollesse.jpg) no-repeat;
}
.trollesse:hover {
background: url(trollessex.jpg) no-repeat;
}
#taurenF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.taurenF {
background: url (logo_taurenF.jpg) no-repeat;
}
.taurenF:hover {
background: url (taurenxF.jpg) no-repeat;
}
#elfedesangF {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfedesangF {
background: url(logo_elfette de sang.jpg) no-repeat;
}
.elfedesangF:hover {
background: url(elfedesangxF.jpg) no-repeat;
}
#mortevivante {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.mortevivante {
background: url(logo_morte-vivante.jpg) no-repeat;
}
.mortevivante:hover {
background: url(mortevivantex.jpg) no-repeat;
}
#orque {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.orque {
background: url(logo_orque.jpg) no-repeat;
}
.orque:hover {
background: url(orquexM.jpg) no-repeat;
}
#troll {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.troll {
background: url(logo_troll.jpg) no-repeat;
}
.troll:hover {
background: url(trollx.jpg) no-repeat;
}
#taurenM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.taurenM {
background: url(logo_taurenM.jpg) no-repeat;
}
.taurenM:hover {
background: url(taurenxM.jpg) no-repeat;
}
#elfedesangM {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.elfedesangM {
background: url(logo_elfe de sang.jpg) no-repeat;
}
.elfedesangM:hover {
background: url(elfedesangxM.jpg) no-repeat;
}
#mortvivant {
padding: 0;
margin: 0;
width: 42px;
height: 42px;
}
.mortvivant {
background: url(logo_mort-vivant.jpg) no-repeat;
}
.mortvivant:hover {
background: url(mortvivantx.jpg) no-repeat;
}
#contenu {
width: 1400px;
height:650px;
background-image:url(fond.jpg);
float: center;
}
#page_pied {
width:1440px;
height: 40px;
background-image:url(piedpage.jpg);
text-align: center;
clear: both;
}
Autres pages sur : probleme image fond easy php
Lassé par la pub ? Créez un compte
Bonjour,
Commençons par les petites erreurs !
HTML ligne 372/374 : Pourquoi fermes-tu une "div" et "html" ici ? Le "body" vient juste d'être ouvert ...
HTML ligne 411 et du même gens : <a ... img src="..." ... /> ... En l'occurence, c'est comme ça : <a ...><img ... /></a> !
Sinon, j'arrive pas à me donner une idée du résultat, tu voudrais pas le mettre en ligne sur un truc gratuit. Juste pour pouvoir analyser correctement la page avec des outils DOM par exemple !
(Le navigateur Chrome a un excellent outil d'analyse Web, clic droit / inspecter élément, sers t'en !)
Bon, j'ai remanié un peu le schmilblik, mais pas évident à analyser sans les images et compagnie !
Donc ta page HTML est devenu :
Tout le CSS qui était dedans je l'ai mis dans "page_style.css" ...
Après, comme j'ai pas d'image je n'arrive pas à voir le problème ... N'hésites pas à nous les partager ou comme j'ai dis préalablement, mettre en ligne ton site quelque part ...
(par contre on a bien compris que c'était sur WoW)
Commençons par les petites erreurs !
Sinon, j'arrive pas à me donner une idée du résultat, tu voudrais pas le mettre en ligne sur un truc gratuit. Juste pour pouvoir analyser correctement la page avec des outils DOM par exemple !
(Le navigateur Chrome a un excellent outil d'analyse Web, clic droit / inspecter élément, sers t'en !)
Bon, j'ai remanié un peu le schmilblik, mais pas évident à analyser sans les images et compagnie !
Donc ta page HTML est devenu :
<html> <head> <title> </title> <meta http-equiv="Content-Type" content="text/HTML; charset=iso-8859-1" /> <link href="page_menu.css" type="text/css" rel="stylesheet" /> <link href="page_style.css" type="text/css" rel="stylesheet" /> </head> <body> <div id="page_entete"></div> <div id="marge_gauche"> <a href="alliance.html" class="alliance" id="alliance"> <img src="alliance.jpg" style="position:absolute; left:0px; top:101px;" /> </a> <a href="humaine.html" class="humaine" id="humaine"> <img src="logo_humaine.jpg" style="position:absolute; left:75px; top:417px;" /> </a> <a href="gnominette.html" class="gnominette" id="gnominette"> <img src="logo_gnominette.jpg" style="position:absolute; left:75px; top:608px;" /> </a> <a href="elfe.html" class="elfeF" id="elfeF"> <img src="logo_elfette de la nuit.jpg" style="position:absolute; left:76px; top:545px;" /> </a> <a href="draeneiF.html" class="draeneiF" id="draeneiF"> <img src="logo_draeneiF.jpg" style="position:absolute; left:75px; top:671px;" /> </a> <a href="naine.html" class="naine" id="naine"> <img src="logo_naine.jpg" style="position:absolute; left:76px; top:481px;" /> </a> <a href="humain.html" class="humain" id="humain"> <img src="logo_humain.jpg" style="position:absolute; left:166px; top:417px;" /> </a> <a href="gnome.html" class="gnome" id="gnome"> <img src="logo_gnome.jpg" style="position:absolute; left:167px; top:608px;" /> </a> <a href="elfe.html" class="elfeM" id="elfeM"> <img src="logo_elfe de la nuit.jpg" style="position:absolute; left:166px; top:544px;" /> </a> <a href="draeneiM.html" class="draeneiM" id="draeneiM"> <img src="logo_draeneiM.jpg" style="position:absolute; left:166px; top:671px;" /> </a> <a href="nain.html" class="nain" id="nain"> <img src="logo_nain.jpg" style="position:absolute; left:166px; top:480px;" /> </a> </div> <div id="marge_droite"> <a href="horde.html" class="horde" id="horde"> <img src="horde.jpg" style="position:absolute; right:0px; top:101px;" /> </a> <a href="orquesse.html" class="orquesse" id="orquesse"> <img src="logo_orquesse.jpg" style="position:absolute; right:72px; top:414px;" /> </a> <a href="trolesse.html" class="trolesse" id="trolesse"> <img src="logo_trolesse.jpg" style="position:absolute; right:72px; top:605px;" /> </a> <a href="taurenF.html" class="taurenF" id="taurenF"> <img src="logo_taurenF.jpg" style="position:absolute; right:73px; top:542px;" /> </a> <a href="elfedesangF.html" class="elfedesangF" id="elfedesangF"> <img src="logo_elfette de sang.jpg" style="position:absolute; right:72px; top:668px;" /> </a> <a href="morte-vivante.html" class="mortevivante" id="mortevivante"> <img src="logo_morte-vivante.jpg" style="position:absolute; right:73px; top:478px;" /> </a> <a href="orque.html" class="orque" id="orque"> <img src="logo_orque.jpg" style="position:absolute; right:163px; top:414px;" /> </a> <a href="troll.html" class="troll" id="troll"> <img src="logo_troll.jpg" style="position:absolute; right:164px; top:605px;" /> </a> <a href="taurenM.html" class="taurenM" id="taurenM"> <img src="logo_taurenM.jpg" style="position:absolute; right:163px; top:541px;" /> </a> <a href="elfedesangM.html" class="elfedesangM" id="elfedesangM"> <img src="logo_elfe de sang.jpg" style="position:absolute; right:163px; top:668px;" /> </a> <a href="mort-vivant.html" class="mortvivant" id="mortvivant"> <img src="logo_mort-vivant.jpg" style="position:absolute; right:163px; top:477px;" /> </a> </div> <div id="contenu"></div> <div id="page_pied"></div> </body> </html>
Tout le CSS qui était dedans je l'ai mis dans "page_style.css" ...
Après, comme j'ai pas d'image je n'arrive pas à voir le problème ... N'hésites pas à nous les partager ou comme j'ai dis préalablement, mettre en ligne ton site quelque part ...
(par contre on a bien compris que c'était sur WoW)
Lassé par la pub ? Créez un compte
- Contenus similaires :
Tags :