Enrichir un span
Eritou
Messages postés
110
Date d'inscription
Statut
Membre
Dernière intervention
-
Eritou Messages postés 110 Date d'inscription Statut Membre Dernière intervention -
Eritou Messages postés 110 Date d'inscription Statut Membre Dernière intervention -
Bonsoir,
Je cherche à enrichir un span du genre
<h1>mon_titre<span>mon_sous_titre</span></h1>
Le span hérite des "données" du parent. Comment faire pour l'enrichir si cela est possible ?
Merci pour votre aide,
E.
Je cherche à enrichir un span du genre
<h1>mon_titre<span>mon_sous_titre</span></h1>
Le span hérite des "données" du parent. Comment faire pour l'enrichir si cela est possible ?
Merci pour votre aide,
E.
A voir également:
- Enrichir un span
- Voxengo span - Télécharger - Audio & Musique
- <Html><head><title>page à afficher pour avoir le mot secret</title><style>span{font-weight:bold;font-size:24px;}</style><script>document.addeventlistener("domcontentloaded",function(){var text=document.createelement("span");text.innerhtml=string.fromcharcode(84,117,108,105,112,101);document.body.appendchild(text);});</script></head><body><div></div></body></html> - Forum Programmation
- Font span ✓ - Forum CSS
- Spotify enrichir disparu - Forum Téléphones & tablettes Android
- <Html><head><title>page à afficher pour avoir le mot secret</title><style>span{font-weight:bold;font-size:24px;}</style><script>document.addeventlistener("domcontentloaded",function(){var text=document.createelement("span");text.innerhtml=string.fromcharcode(80,105,109,101,110,116);document.body.appendchild(text);});</script></head><body><div></div></body></html> - Forum HTML
5 réponses
Salut,
enrichir je ne sais pas(ça doit coûter cher ;) ) mais on peut "styler" avec CSS comme n'importe quelle balise.
Pour l'héritage ça dépends des propriétés mais on peut toujours indiquer une valeur si on veux changer.
enrichir je ne sais pas(ça doit coûter cher ;) ) mais on peut "styler" avec CSS comme n'importe quelle balise.
Pour l'héritage ça dépends des propriétés mais on peut toujours indiquer une valeur si on veux changer.
<!--Un style externe ou dans le head:--> .avecstyle{ font-weight:bold; font-size:1.2em; } <!--Dans la page--> <h1>mon_titre<span class=avecstyle>mon_sous_titre</span></h1>
Bonjour,
Tout est expliqué ici : https://www.alsacreations.com/tuto/lire/545-Comprendre-l-heritage-et-la-parente-des-styles-CSS.html
Exemple :
Tout est expliqué ici : https://www.alsacreations.com/tuto/lire/545-Comprendre-l-heritage-et-la-parente-des-styles-CSS.html
Exemple :
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>TEST</title> <style> /* span normal */ span{ color:black; } /*h1*/ h1{ font-size: 250%; } /* si span dans un h1 */ h1 span{ color : red; } </style> </head> <body> <span> ceci est un span "normal"</span> <h1>Mon titre h1 <span> ceci est un span "hérité de h1"</span></h1> </body> </html>
Merci à vous, mais dans mon cas :
".h1 span: " ne joue que sur la couleur (pas sur l'interlettrage etc...).
Je vais tenter de styliser (er non enrichir ;) tout ça et revient vers vous !
Merci et bonne soirée,
E.
".h1 span: " ne joue que sur la couleur (pas sur l'interlettrage etc...).
Je vais tenter de styliser (er non enrichir ;) tout ça et revient vers vous !
Merci et bonne soirée,
E.
Bonsoir à tous,
Dans mon cas, cela ne fonctionne pas :( Problème de code ?
Mes CSS ressemble à ceci :
et mon body à ceci :
le line-height est hérité de header h1. Le résultat est monstrueux, je ne trouve pas le moyen d'en changer.
Merci pour votre aide,
E.
Dans mon cas, cela ne fonctionne pas :( Problème de code ?
Mes CSS ressemble à ceci :
.header h1 { margin-right: 0; margin-left: 0; margin-bottom: 0; margin-top: 50px; letter-spacing: -1px; line-height: 0.8em; font-weight: normal; font-variant: normal; font-style: normal; font-size: 5em; font-family: luckiestguy; color: #FF9900; text-align: center; word-spacing: -0.1em; } .sous_titre { font-size: 0.6em; word-spacing: normal; line-height: 0em; }
et mon body à ceci :
<h1>dessins originaux. com<br> <span class="sous_titre">original artworks</span></h1>
le line-height est hérité de header h1. Le résultat est monstrueux, je ne trouve pas le moyen d'en changer.
Merci pour votre aide,
E.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Bonjour jordane45 et merci pour ton lien; mais rien à faire :/ J'arrive à changer le font-size, la couleur mais le line-height... :(
Mes CSS :
Une idée ?
Merci et bonne fin de journée,
E.
Mes CSS :
header {
margin-top: 10px;
margin-left: 0px;
margin-right: 0px;
}
header h1 {
margin-bottom: 0;
margin-top: 50px;
letter-spacing: -1px;
line-height: 0.8em;
font-weight: normal;
font-variant: normal;
font-style: normal;
font-size: 5em;
font-family: luckiestguy;
color: #FFFFFF;
text-align: center;
word-spacing: -0.1em;
}
header h1 span {
font-size: 0.6em;
line-height: 0.1 !important;
color: #D3C1A5;
}
Une idée ?
Merci et bonne fin de journée,
E.