Problème CSS avec le menu
Résolu/Fermé
Bonjour, je suis un tutoriel pour faire mon site, je suis au CSS et lorsque je centre (Haut=>Milieu=>Bas, PAS Droite=>Milieu=>Bas) ben l'image du menu se répète plus bas :
http://www.hostingpics.net/viewer.php?id=539474Untitled_1.jpg
(j'utilise le code padding-top: 40px;)
http://www.hostingpics.net/viewer.php?id=539474Untitled_1.jpg
(j'utilise le code padding-top: 40px;)
A voir également:
- Problème CSS avec le menu
- Menu déroulant excel - Guide
- Windows 11 menu démarrer classique - Guide
- Réinitialiser menu démarrer windows 10 - Guide
- Canon quick menu - Télécharger - Utilitaires
- Windows 11 menu contextuel classique - Guide
12 réponses
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 14:36
11 avril 2010 à 14:36
Sans le code complet, ou une url, ce n'est pas facile de dire grand chose...
#menu
{
background-image: url("../site/images/haut.jpg");
background-repeat:none;
width: 1000px;
height: 161px;
text-align: center;
font-size: 16px;
padding-top: 40px;
}
{
background-image: url("../site/images/haut.jpg");
background-repeat:none;
width: 1000px;
height: 161px;
text-align: center;
font-size: 16px;
padding-top: 40px;
}
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
Modifié par notobe le 11/04/2010 à 15:01
Modifié par notobe le 11/04/2010 à 15:01
Quand je disais code complet, c'est html + CSS ;)
Comment je peux vous les faire parvenir ?
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 15:11
11 avril 2010 à 15:11
Si le site n'est pas en ligne, copier aussi le code html ici.
CSS :
body
{
background-color: #6a3737;
}
#header
{
background-image: url("../site/images/banniere.jpg");
width: 1000px;
height: 255px;
}
#menu
{
background-image: url("../site/images/haut.jpg");
background-repeat:none;
width: 1000px;
height: 161px;
text-align: center;
font-size: 16px;
padding-top: 40px;
}
#corps
{
background-image: url("../site/images/milieu.jpg");
background-repeat: repeat-y;
width: 1000px;
}
#footer
{
background-image: url("../site/images/bas.jpg");
width: 1000px;
height: 85px;
}
#conteneur
{
margin: auto;
width: 778px;
}
#menu a
{
color: white;
margin-left: 10px;
margin-right: 10px;
}
HTML :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>JeffCky Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" href="index.css" />
</head>
<body>
<div id="conteneur">
<div id="header"></div>
<div id="menu">
<a href='index.html'>Accueil</a> <a href='index.html'>News</a> <a href='index.html'>Guestbook</a></div>
<div id="corps"></div>
<div id="corps">
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
</div>
<div id="footer">
Jeffcky Copyright - Tous droits réservés © 2010
</div>
</body>
</html>
body
{
background-color: #6a3737;
}
#header
{
background-image: url("../site/images/banniere.jpg");
width: 1000px;
height: 255px;
}
#menu
{
background-image: url("../site/images/haut.jpg");
background-repeat:none;
width: 1000px;
height: 161px;
text-align: center;
font-size: 16px;
padding-top: 40px;
}
#corps
{
background-image: url("../site/images/milieu.jpg");
background-repeat: repeat-y;
width: 1000px;
}
#footer
{
background-image: url("../site/images/bas.jpg");
width: 1000px;
height: 85px;
}
#conteneur
{
margin: auto;
width: 778px;
}
#menu a
{
color: white;
margin-left: 10px;
margin-right: 10px;
}
HTML :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>JeffCky Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" href="index.css" />
</head>
<body>
<div id="conteneur">
<div id="header"></div>
<div id="menu">
<a href='index.html'>Accueil</a> <a href='index.html'>News</a> <a href='index.html'>Guestbook</a></div>
<div id="corps"></div>
<div id="corps">
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
Blablablablalbalblablalbal Blablablablalbalblablalbal
</div>
<div id="footer">
Jeffcky Copyright - Tous droits réservés © 2010
</div>
</body>
</html>
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 15:48
11 avril 2010 à 15:48
C'est normal le doublon <div id="corps"> ? Surtout qu'un id ne peut servir qu'une seule fois normalement...
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Où ?
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 16:14
11 avril 2010 à 16:14
<a href='index.html'>Accueil</a> <a href='index.html'>News</a> <a href='index.html'>Guestbook</a></div> <div id="corps"></div> <div id="corps"> Blablablablalbalblablalbal Blablablablalbalblablalbal
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 16:21
11 avril 2010 à 16:21
Il faut l'enlever.
Ben je l'ai fait, mais sa ne change pas :s
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 17:19
11 avril 2010 à 17:19
Je n'arrive pas à reproduire le phénomène, mais évidemment, je n'ai pas les images... donc.
Cela dit, une autre erreur : ce n'est pas background-repeat:none, mais background-repeat:no-repeat.
Ou plus simplement :
Cela dit, une autre erreur : ce n'est pas background-repeat:none, mais background-repeat:no-repeat.
Ou plus simplement :
background: url("../site/images/milieu.jpg") no-repeat;
Ben il ne l'a plus si je met ca
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
11 avril 2010 à 20:34
11 avril 2010 à 20:34
Tu as bien enlevé le suffixe -image ?
Sufixe image ?
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
12 avril 2010 à 10:33
12 avril 2010 à 10:33
enlever le -image de background-image
Sa ne change pas
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
12 avril 2010 à 12:17
12 avril 2010 à 12:17
Tu pourrais la mettre en ligne cette page ?
Je l'ai mise sur atspace, mais il bug, il dit que le chargement a échouer
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
12 avril 2010 à 14:32
12 avril 2010 à 14:32
Bon...
Mets tes images à télécharger quelque part que je puisse les récupérer.
Quel doctype as-tu utilisé ? Ce phénomène se produit-il sur tous les navigateurs ?
Mets tes images à télécharger quelque part que je puisse les récupérer.
Quel doctype as-tu utilisé ? Ce phénomène se produit-il sur tous les navigateurs ?
http://www.hostingpics.net/viewer.php?id=825887banniere.jpg
http://www.hostingpics.net/viewer.php?id=737675bas.jpg
http://www.hostingpics.net/viewer.php?id=120948haut.jpg
http://www.hostingpics.net/viewer.php?id=351254milieu.jpg
http://jeffcky.atspace.com/
Je ne sais pas qu'elle doctype j'ai utiliser :/
http://www.hostingpics.net/viewer.php?id=737675bas.jpg
http://www.hostingpics.net/viewer.php?id=120948haut.jpg
http://www.hostingpics.net/viewer.php?id=351254milieu.jpg
http://jeffcky.atspace.com/
Je ne sais pas qu'elle doctype j'ai utiliser :/
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
Modifié par notobe le 12/04/2010 à 15:52
Modifié par notobe le 12/04/2010 à 15:52
Et c'est c'est en ligne finalement ! cool... :)
C'est du xhtml 1.0 Strict ton doctype...
Pas très judicieux le choix de tes images, mais bon, la solution :
code CSS
Code html du menu :
C'est du xhtml 1.0 Strict ton doctype...
Pas très judicieux le choix de tes images, mais bon, la solution :
code CSS
#menu { background: url("haut.jpg") no-repeat; width: 1000px; height: 161px; text-align: center; font-size: 16px; } #menu p { margin:0; line-height:100px; }
Code html du menu :
<div id="menu"> <p><a href='index.html'>Accueil</a> <a href='index.html'>News</a> <a href='index.html'>Guestbook</a></p></div>