Mise à jour le 24/04/2006 22:01
Cette article à pour but de vous faire créer une banière sans la moindre image, avec uniquement du CSS "in line". L'intérêt principal étant un allègement conséquent de votre blog
1 / Code source commenté
Ci dessous le code source commenté (commentaire en vert) pour votre bannière. Ne copier/coller pas ce code, à cause de son formatage il ne fonctionnera pas... Pour faire un copié/collé prenez le code du 2ème paragraphe.
HTML commenté
<!-- 1er bloc (supérieur) -->
<DIV
style="BACKGROUND: #544745; <!-- Background pavé supérieur -->
WIDTH: 100%; <!-- Largeur du pavé supérieur -->
PADDING-TOP: 3px;
PADDING-BOTTOM: 5px;
LINE-HEIGHT: 1em;
FONT-WEIGHT: bold; <!-- Titre en gras -->
FONT-SIZE: 54px; <!-- Taile du titre -->
FONT-FAMILY: Georgia,Times; <!-- Police du titre -->
COLOR: #98c5dc" <!-- Couleur du titre -->
onclick="top.location.href='http://url...';"><!-- URL au clique -->
<!-- *** Titre blog ***-->
<SPAN
title="Aller à l'accueil" <!-- Infobulle au survole du titre -->
onmouseover="this.style.color='white';" <!-- Couleur onmouseover-->
onmouseout="this.style.color='#98c5dc';"<!-- Couleur onmouseout -->
style="COLOR: #98c5dc; <!-- Couleur du titre -->
CURSOR: hand"> <!-- pointeur lien -->
Titre du Blog <!-- Texte du titre-->
</SPAN>
<!--*** 1ère accroche ***-->
<SPAN
style="PADDING-LEFT: 5px;
FONT-WEIGHT: bold; <!-- "1ère accroche" en gras -->
FONT-SIZE: 12px; <!-- Taille "1ère accroche" -->
COLOR: #98c5dc; <!-- Couleur "1ère accroche" -->
FONT-FAMILY: geneva,arial"> <!-- Police "1ère accroche" -->
Texte de 1ère accroche <!-- Texte "1ère accroche" -->
</SPAN>
</DIV>
<!-- 2ème bloc (inférieur) -->
<!--*** 2ème accroche ***-->
<DIV
style="FONT-WEIGHT: bold; <!-- "2ème accroche" en gras -->
FONT-SIZE: small; <!-- Taille "2ème accroche" -->
COLOR: #544745; <!-- Couleur "2ème accroche" -->
BACKGROUND: #98c5dc; <!-- Couleur de fond bloc inférieur -->
WIDTH: 100%; <!-- Largeur bloc inférieur -->
FONT-FAMILY: system,geneva; <!-- Police "2ème accroche" -->
TEXT-ALIGN: center"> <!-- Alignement txt "2ème accroche" -->
Texte de deuxième accroche... <!-- Texte "2ème accroche" -->
</DIV>
2 / Code de base à utiliser en copier/coller
Ce code est à insérer en mode HTML de préférence dans l'entête de votre blog, mais cela peut aussi être fait dans un article, un module de texte libre ou bien le pied de page de votre blog.
HTML à copier/coller
<DIV style="BACKGROUND: #544745; WIDTH: 100%; PADDING-TOP: 3px; PADDING-BOTTOM: 5px; LINE-HEIGHT: 1em; FONT-WEIGHT: bold; FONT-SIZE: 54px; FONT-FAMILY: Georgia,Times; COLOR: #98c5dc" onclick="top.location.href='http://url...';">
<SPAN title="Aller à l'accueil" onmouseover="this.style.color='white';"
onmouseout="this.style.color='#98c5dc';" style="COLOR: #98c5dc; CURSOR: hand"> Titre du Blog
</SPAN>
<SPAN style="PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #98c5dc; FONT-FAMILY: geneva,arial; VERTICAL-ALIGN: center"> Texte de 1ère accroche
</SPAN>
</DIV>
<DIV style="FONT-WEIGHT: bold; FONT-SIZE: small; COLOR: #544745; BACKGROUND: #98c5dc; WIDTH: 100%; FONT-FAMILY: system,geneva; TEXT-ALIGN: center"> Texte de deuxième accroche...
</DIV>
Avec ce code, on obtient:
Mon Blog1ère accroche
Texte de deuxième accroche...
3 / Faites travailler votre imagination, quelques exemples
Variation de couleur:
Mon Blog1ère accroche
Texte de deuxième accroche...
Texte défilant:
>Mon BlogPar moi
Multicolor:
PêUR?
4 / Aller plus loin: Bannière avec menu cliquable
#Mon Blog !!Par moi
Zoélie SuperSouris Francisek
A vous de jouer, ci-dessous le code de l'exemple avec menu cliquable, (Utilisable en copié/collé):
HTML à copier/coller
<DIV
style="FONT-WEIGHT: bold; FONT-SIZE: 54px; BACKGROUND: #39002c; PADDING-BOTTOM: 5px; WIDTH: 100%; COLOR: #decbbd; LINE-HEIGHT: 1em; PADDING-TOP: 3px; FONT-FAMILY: Georgia,Times" onclick="top.location.href='http://url...';">
<SPAN
onmouseover="this.style.color='white';" title="Aller à l'accueil" style="CURSOR: hand; COLOR: #decbbd" onmouseout="this.style.color='#decbbd';">#Mon Blog !!
</SPAN>
<SPAN
style="PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #decbbd; FONT-FAMILY: geneva,arial">Par Guillaume
</SPAN>
</DIV>
<DIV
style="FONT-WEIGHT: bold; FONT-SIZE: small; BACKGROUND: #61110a; WIDTH: 100%; COLOR: #decbbd; FONT-FAMILY: system,geneva; TEXT-ALIGN: center">
<MARQUEE>Vous touverez sur ce #blog!! tout ce que j'aime...</MARQUEE>
</DIV>
<!-- menu cliquable -->
<DIV
style="FONT-WEIGHT: bold; FONT-SIZE: small; BACKGROUND: #decbbd; WIDTH: 100%; COLOR: #39002c; FONT-FAMILY: system,geneva; TEXT-ALIGN: left">
<!-- Bouton 1 -->
<SPAN
onmouseover="this.style.background='#61110a'; this.style.color='white'" title="vie palpitante" style="BACKGROUND: #decbbd; CURSOR: hand; COLOR: #39002c" onclick="top.location.href='http://zoelie.over-blog.com';" onmouseout="this.style.background='#decbbd'; this.style.color='#39002c'"> Zoélie
</SPAN>
<!-- Bouton 2 -->
<SPAN
onmouseover="this.style.background='#61110a'; this.style.color='white'" title="Vous avez aimé les aventures loufoques de SuperSouris ?" style="BACKGROUND: #decbbd; CURSOR: hand; COLOR: #39002c" onclick="top.location.href='http://www.supersouris.net/';" onmouseout="this.style.background='#decbbd'; this.style.color='#39002c'"> SuperSouris
</SPAN>
<!-- Bouton 3 -->
<SPAN
onmouseover="this.style.background='#61110a'; this.style.color='white'" title="Génie pour lui même... et pour les autres" style="BACKGROUND: #decbbd; CURSOR: hand; COLOR: #39002c" onclick="top.location.href='http://www.francisek.com/';" onmouseout="this.style.background='#decbbd'; this.style.color='#39002c'"> Francisek
</SPAN>
</DIV>
Ils, elles utilisent cette méthode
Source
Peut-être une Réponse