Mon texte ne change pas de couleur

Résolu/Fermé
gaya_102 - 29 sept. 2009 à 10:59
ancreo Messages postés 3 Date d'inscription mardi 29 septembre 2009 Statut Membre Dernière intervention 29 septembre 2009 - 29 sept. 2009 à 14:56
Bonjour,

voila je voudrais changer la couleur de mon titre mais ca ne marche pas. Je lui demande actuellement d'etre en rouge pas non il reste violet.

pourquoi ca fais ca?

c'est le h1

merci d'avance


li
{display:inline;}

.centreX
{
	position:absolute;
	left:50%;
	margin-left:-490px;
	width: 980px;
	top:50%;
	margin-top:-271px;
	height: 542px;
	background-image : url("images/fond_page.jpg");
	background-repeat: no-repeat;
	border :2px solid black;
	font-style: italic;
}
body {
	background-color: #f7d8fc;
	font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;
	font-style: italic;}
	
	span.titre {
color: #b04cbf;
	font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;

	font-size: 35px;
	text-decoration: none;
	text-align: center;
	position:absolute;
	top: 5px;
	left : 185px;
	font-style: italic;

}

a {
	color: #781d89;
	font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;
font-style: italic;
	font-size: 17px;
	text-decoration: none;
	text-align: center;
} 

a:hover {
    color: #e365f6;
	font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;

	font-size: 17px;
	text-decoration: none;
	text-align: center;
	font-style: italic;
}

span.slogan {
color: #7890d2;
	font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;

	font-size: 17px;
	text-decoration: none;
	text-align: right;
	position:absolute;
	top: 50px;
	left: 558px;
	font-style: italic;
	margin-right:15px;
	}
	
	h1
	{
	font-size: 17px;

text-align:left;
text-decoration: underline ;
position:absolute;
top: 140px;
left:230px;
color: red;
	font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;
	font-style: italic;
}
	
	
#menuHorizon {
float:right;
margin-top:108px;
padding-left:0;
padding-right:25px;
}

#header p.texte {
margin:0px;
}
#menuHorizon li {
display:inline;
height:400px;
line-height:26px;
vertical-align:top;
left:100px
}

h1
{
font-size: 16,5px;
color: #781d89;

text-decoration: underline ;
}

.menuG {
position: relative;
	float:left;
	width:160px;
	height:383px;
	top: 255px;
	
	text-align: center;
	font-size: 17px;
	}
	
	table
{
margin: auto; /* Centre le tableau */
position: relative;
top: 35px;
   border-collapse: separate; /* Les bordures du tableau seront pas collées */
}
td
{
text-align: center; /* Tous les textes des cellules seront centrés*/
   border: 0px solid black;
}



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>La collection faire-part mariage - le monde de gaya</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1;" />
<meta name="description" content="Vos faire-part de naissance, mariage, remerciements, stickers et tableaux personnalisés qui vous correspondent le mieux ... Aide pour vos événements : mariage/pacs, communion, anniversaire ..." />
<meta http-equiv="content-language" content="fr, en" />
<meta name="author" content="Thaon Sandrine" />
<link rel="shortcut icon" type="image/x-icon" href="gaya_files/favicon0.htm" />
<link rel="stylesheet" href="page4.css" type="text/css" media="all" />
</head>
<body>
<div class="centreX">
	<div id="header">
		<p class="texte"><strong><span class="titre">Le monde de Gaya</span> <span class="slogan">Faire-part de mariage originaux et personnalisés.</span></strong></p>
	
					<?php
include("menu.php");
?>
	
	</div>
	<div id="content">

		<ul class="menuG">
			<li><a class="gauche" href="http://www.lemondedegaya.fr/collection.php">La collection</a></li><br><br>
			<li><a class="gauche" href="http://www.lemondedegaya.fr/format.php">Les formats</a></li><br><br>
			<li><a class="gauche" href="http://www.lemondedegaya.fr/papiers.php">Les papiers</a></li><br><br>
			<li><a class="gauche" href="http://www.lemondedegaya.fr/textes.php">Idées de textes</a></li><br><br>
			<li><a class="gauche" href="http://www.lemondedegaya.fr/conditions.php">Conditions générales de ventes</a> </li>
		</ul>
		<div class="fenetre">
<br>
			<h1>La collection de faire-part de mariage </h1>
			
			<table>
   <tr>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/comme_site_devant_petite.jpg" alt="" width="141" height="100" /></a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/oui_devant_petite.jpg" alt="" width="141" height="100" /></a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/dessin_marie_devant_petite.jpg" alt="" width="141" height="100" /></a></td>
		<td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/comme_site_devant_petite.jpg" alt="" width="141" height="100" /></a></td>

   </tr>
   <tr>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >la branche</a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >le oui</a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >les mariés</a></td>
	   <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >le cygne</a></td>
   </tr>
   <tr>
       <td>1€</td>
       <td>1€</td>
       <td>1€</td>
	   <td>1€</td>
   </tr>
</table>
<br>
<table>
   <tr>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/comme_site_devant_petite.jpg" alt="" width="141" height="100" /></a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/comme_site_devant_petite.jpg" alt="" width="141" height="100" /></a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/comme_site_devant_petite.jpg" alt="" width="141" height="100" /></a></td>
		<td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" ><img src="images/comme_site_devant_petite.jpg" alt="" width="141" height="100" /></a></td>

   </tr>
   <tr>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >la branche</a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >les mariés</a></td>
       <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >le cygne</a></td>
	   <td><a href="http://www.lemondedegaya.fr/faire-part-cygne.htm" class="uli" >le cygne</a></td>
   </tr>
   <tr>
       <td>1€</td>
       <td>1€</td>
       <td>1€</td>
	   <td>1€</td>
   </tr>
</table>

			
			
		</div>
	</div>

</div>
</body>
</html>

4 réponses

lafclem Messages postés 19 Date d'inscription mercredi 17 janvier 2007 Statut Membre Dernière intervention 29 septembre 2009 1
29 sept. 2009 à 11:03
Essaye CTRL + F5 pour actualiser ton cache (une fois sur la page web) ?
0
bonjour, la réponse à ton probleme est très simple
tu dois déclarer la couleur rouge en hexadecimal : #ff0000;
car red, black, white, ne sont plus des déclarations valide en CSS
bonne journée
0
merci de ton conseil
0
graffx Messages postés 6506 Date d'inscription jeudi 22 mars 2007 Statut Contributeur Dernière intervention 24 mars 2019 1 973
29 sept. 2009 à 12:50
La solution est encore plus simple:

t a deux fois dans ton css la balise h1, il y a conflit et la seconde H1 n' est pas pris en compte, donc la couleur non plus:


EN PREMIER:
h1
{
font-size: 17px;
color: #781d89;
text-align:left;
text-decoration: underline ;
position:absolute;
top: 140px;
left:230px;
color: red;
font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;
font-style: italic;
}

EN SECOND:

h1
{
font-size: 16,5px;
color: #781d89;



SOLUTION:

efface la deuxieme H1 aprés avoi fusionné avec la premiere, ce qui donnera dans ton unique H1 (le premier):

h1
{
font-size: 17px;
color: #781d89;
text-align:left;
text-decoration: underline ;
position:absolute;
top: 140px;
left:230px;
color: red;
font-family:Georgia,Comic Sans MS, Times New Roman, Times, serif;
font-style: italic;
}
0
ancreo Messages postés 3 Date d'inscription mardi 29 septembre 2009 Statut Membre Dernière intervention 29 septembre 2009
29 sept. 2009 à 14:56
ah oui très juste graffx, tu as mieux regardé le code que moi...
j'avais pas vu que h1 était déclaré deux fois...
0