Comment lier page .html à mon fichier .css?

Résolu
lawken -  
kiyomasa Messages postés 312 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour à tous!
J'ai un probleme avec la relation entre ma page.html et mon fichier .css
Dans le dossier où se trouve mon site j'ai crée un autre dossier que j'apelle css où j'ai stocké mon fichier .css
Mais j'arrive toujours pas à ce que les données que je saisi au niveau de mon fichier .css s'appliquent dans ma page .html
aidez-moi svp.
voici ma configuration côté html:
ml:lang="fr" >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ACCUEIL</title>
<meta http-equiv="content-type"content="text/html";charset=iso-8859-1 />
<link rel="stylesheet"media="screen"type="text/css"href="css/accueil.css" />
</head>
Et voici mon fichier .css:
h1
{
font-family:arial; /*Le titre sera en Arial*/
text-align:center;
text-weight:bold;
text-decoration:underline;
}
#banniere
{
margin-left:150px;
margin-right:150px;
}
body
{
text-align:justify;font-family:verdana;
background-image:"/home/agent/bureau/images/eclaire.jpg"fixed;
}
A voir également:

5 réponses

Utilisateur anonyme
 
salut,
tout d'abord vérifie bien les noms de dossiers et fichiers avec ceux que tu as entré dans le fichier html(le plus souvent on clique sur renommer et on copie le nom)
si tu es sûr que ça marche eh bien tu mets un peut d'espace entre les attributs dans la balise link
<link rel="stylesheet"  media="screen"  type="text/css"  href="css/accueil.css" /> 

et là si ca ne marche pas toujours essai de mettre ton ffichier css dans le repertoire principale et là href="accueil.css"
sinon et j'espere que tu n'auras pas le faire :
mettre le code css dans le fichier html
html:
ml:lang="fr" >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>ACCUEIL</title>
<meta http-equiv="content-type"content="text/html";charset=iso-8859-1 />
<link rel="stylesheet"media="screen"type="text/css"href="css/accueil.css" />
</head> 
<style type="text/css">
h1
{
font-family:arial; /*Le titre sera en Arial*/
text-align:center;
text-weight:bold;
text-decoration:underline;
}
#banniere
{
margin-left:150px;
margin-right:150px;
}
body
{
text-align:justify;font-family:verdana;
background-image:"/home/agent/bureau/images/eclaire.jpg"fixed;
}

</style>

ça au moins c'est infaillible :p
@+
8