CSS
Résolu
guibbor
Messages postés
205
Date d'inscription
Statut
Membre
Dernière intervention
-
guibbor Messages postés 205 Date d'inscription Statut Membre Dernière intervention -
guibbor Messages postés 205 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je suis grand debutant en informatique.
Je ne comprends pas le probleme de ce code car quand je l'ajoute dans une page web il la rend blanche ^^
Si vous voyez le probleme... :)
<style type="text/css>
body { background-color : black;
color : yellow;
font-size: 16px;
font-family: Garamond;
margin-left: 72px ;
margin-right: 72px;
margin-top: 72px;
}
h1,h2,h3 { color: red ;
font-family: arial;
font-size: 36 px;
}
<style/>
Je suis grand debutant en informatique.
Je ne comprends pas le probleme de ce code car quand je l'ajoute dans une page web il la rend blanche ^^
Si vous voyez le probleme... :)
<style type="text/css>
body { background-color : black;
color : yellow;
font-size: 16px;
font-family: Garamond;
margin-left: 72px ;
margin-right: 72px;
margin-top: 72px;
}
h1,h2,h3 { color: red ;
font-family: arial;
font-size: 36 px;
}
<style/>
A voir également:
- CSS
- Css download - Télécharger - HTML
- Enlever le soulignement d'un lien css ✓ - Forum CSS
- Enlever soulignement lien css ✓ - Forum CSS
- Bouton css ✓ - Forum CSS
- Redimensionner image css - Forum HTML
5 réponses
salut deja il es preferable de creer un fichier css et de faire reference a ce fichier dans ton code html :
Code Html : Index.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>Exemple d'utilisation de CSS externe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="design.css" />
</head>
<body>
<p>Cette page comporte une feuille de style externe. C'est la meilleure méthode à utiliser quand on fait du CSS.</p>
</body>
</html>
Code CSS : Design.css :
body
{
background-color : black;
color : yellow;
font-size: 16px;
font-family: Garamond;
margin-left: 72px ;
margin-right: 72px;
margin-top: 72px;
}
h1,h2,h3 { color: red ;
font-family: arial;
font-size: 36 px;
}
<style/>
Tu vois ? Je l'ai testé chez moi et il marche tres bien fond noir, ecriture jaune ;)
Code Html : Index.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>Exemple d'utilisation de CSS externe</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="design.css" />
</head>
<body>
<p>Cette page comporte une feuille de style externe. C'est la meilleure méthode à utiliser quand on fait du CSS.</p>
</body>
</html>
Code CSS : Design.css :
body
{
background-color : black;
color : yellow;
font-size: 16px;
font-family: Garamond;
margin-left: 72px ;
margin-right: 72px;
margin-top: 72px;
}
h1,h2,h3 { color: red ;
font-family: arial;
font-size: 36 px;
}
<style/>
Tu vois ? Je l'ai testé chez moi et il marche tres bien fond noir, ecriture jaune ;)
guibbor
Messages postés
205
Date d'inscription
Statut
Membre
Dernière intervention
19
okai merci beaucoup mais j'utilisai les feuilles de styles internes surtout par depit parce que je ne savais pas comment faire reference depuis la feuille de style ( je ne comprends pas la fonction @import ) vers la page html en local...
Cool, tu sais c'est pas compliquer tu as le site du zero pour apprendre tout sa. Bref si sa ta aidez stp passe ce message en resolu :) merci
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question