Canalblog
Editer l'article Suivre ce blog Administration + Créer mon blog
Publicité
Des trucs et des astuces
23 avril 2007

Ma bannière en avancé, alors que je n'en avais pas avant.

Oui!!

Bon alors,

On s'est créé un gentil blog, en mode normal on s'est mis un beau titre, une toute belle explication, puis on a évolué, sommes passés en mode "avancé", avons ajouté des trucs de ci de là....
Et on veut ajouter une bannière parce que du coup ça ferait plus beau....

Heuuuuu oui, mais en mode avancé, il n'y a plus le choix de chargement du logo ou de la bannière,
- Diantre!! Mais où donc vais-je pour la charger, cette belle et nouvelle bannière?

Première étape,

Créer un nouveau message, qu'on sauvera en mode brouillon, pour pouvoir y retourner de temps en temps.
tutoban05
Et là, charger la photo (mais attention, pas par le traditionnel lien "d'insertion d'image", mais par l'insertion d'un fichier. Car.... la photo serait redimensionnée et ne correspondrait plus à la longueur de la bannière.
tutoban06
tutoban07

Ceci effectué, basculer en mode "html" [avec la touche <> ] et copier l'adresse url du document chargé.

tutoban08

Sauvegarder (publier en mode brouillon ne le rend pas accessible au public et permet de pouvoir récupérer au besoin l'adresse du fichier dans "mes documents" du blog).
tutoban12

Deuxième étape,

Editons donc nos fichiers de mise en page, et plus principalement la feuille de style
tutoban03

Etant donné que nous n'avions pas de bannière, le bloc #topbar a la propriété display: block; (afficher en bloc) mais ce n'est pas lui qui affiche la bannière en image, non allons donc remplacer block; par none;
01fdstopbar

Ensuite on recherche le bloc #topbar-logo qui lui affiche la bannière en image, on s'aperçoit que le height (hauteur de l'image) est à 0px et que le display est à none

02fdstopbar
nous allons intervenir à background (qui est le fond) et y coller l'url qu'on a copier après la couleur:
03fdstopbar
le lien sera pécisé par url(lien-de-l-image.jpg) suivi de no-repeat et de 0 0 (pour qu'elle ne se répète pas et qu'elle soit position en haut à gauche)
changer la hauteur de l'image height: hauteur-de-l-image-en-px;
et changer display: block;
un petit coup d'oeil qu'on a bien changer #topbar
04fdstopbar

on valide, et on jette un oeil sur le résultat

tutoban11(réactualiser la page au besoin "[Ctrl] + [F5]")

Publicité
Commentaires
M
Coucou :) je suis sur canalblog! et ça fait des heures que j'essaie de mettre une bannière! je suis en mode avancé!j'ai tout fait les changements que vous avez mentionné et toujours rien c'est blanc et je ne vois pas la bannière!!! voici le codage que j'ai mis! pouvez-vous m'aider svp :)<br /> <br /> <br /> body {<br /> margin: 60px 0px 0px 0px;<br /> text-align: center;<br /> background: #E3E3E3;<br /> }<br /> #container {<br /> width: 986px;<br /> padding: 0px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> margin-right: auto;<br /> margin-left: auto;<br /> -webkit-border-radius: 20px 20px 20px 20px;<br /> -moz-border-radius: 20px 20px 20px 20px;<br /> border-radius: 20px 20px 20px 20px;<br /> }<br /> #content {<br /> float: left;<br /> width: 680px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> -webkit-border-radius: 0px 0px 20px 20px;<br /> -moz-border-radius: 0px 0px 20px 20px;<br /> border-radius: 0px 0px 20px 20px;<br /> }<br /> #rightbar {<br /> float: left;<br /> width: 306px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> -webkit-border-radius: 0px 0px 20px 0px;<br /> -moz-border-radius: 0px 0px 20px 0px;<br /> border-radius: 0px 0px 20px 0px;<br /> }<br /> #leftbar {<br /> float: left;<br /> width: 0px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> -webkit-border-radius: 0px 0px 0px 20px;<br /> -moz-border-radius: 0px 0px 0px 20px;<br /> border-radius: 0px 0px 0px 20px;<br /> }<br /> # topbar-logo { <br /> border-top-style: none; <br /> border-right-style: none; <br /> border-bottom-style: solid; <br /> border-left-style: none; <br /> border-width: 1px; <br /> border-color: #99B2CC; <br /> background: #334C66 url(":url:storage.canalblog.com/07/97/926937/70242354.jpg") no-repeat <br /> 0% 0%; <br /> height: 150px; <br /> display: block; <br /> -webkit-border-radius: 20px 20px 0px 0px;<br /> -moz-border-radius: 20px 20px 0px 0px;<br /> border-radius: 20px 20px 0px 0px;<br /> }<br /> div .logolink a {<br /> display: block;<br /> text-decoration: none;<br /> width: 100%;<br /> height: 150px;<br /> }<br /> #topbar {<br /> background-color: #ccc;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> padding: 20px;<br /> display: none;<br /> -webkit-border-radius: 20px 20px 0px 0px;<br /> -moz-border-radius: 20px 20px 0px 0px;<br /> border-radius: 20px 20px 0px 0px;<br /> }<br /> a {<br /> text-decoration: none;<br /> }<br /> a:link {<br /> color: #345E9B;<br /> text-decoration: none;<br /> }<br /> a:visited {<br /> color: #345E9B;<br /> text-decoration: none;<br /> }<br /> a:active {<br /> color: #345E9B;<br /> text-decoration: none;<br /> }<br /> a:hover {<br /> color: #345E9B;<br /> text-decoration: underline;<br /> }<br /> h1 {<br /> margin: 0px;<br /> padding: 0px;<br /> }<br /> h2 {<br /> margin: 0px;<br /> padding: 0px;<br /> }<br /> h3 {<br /> margin: 0px;<br /> padding: 0px;<br /> }<br /> #topbar h1 {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #345E9B;<br /> font-size: 60px;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-align: left;<br /> }<br /> #topbar a {<br /> text-decoration: none;<br /> color: #345E9B;<br /> }<br /> .blogbody {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> padding: 10px;<br /> text-align: left;<br /> line-height: 150%;<br /> }<br /> .blogbody h2 {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: bold;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> margin-bottom: 10px;<br /> padding: 0px;<br /> }<br /> .blogbody h3 {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #345E9B;<br /> font-size: medium;<br /> font-weight: bold;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: dotted;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #E7E2DC;<br /> margin-bottom: 10px;<br /> padding: 3px;<br /> }<br /> .blogbody p {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> line-height: 150%;<br /> margin-bottom: 10px;<br /> }<br /> .blogbody .itemfooter {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: x-small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> margin-bottom: 25px;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> padding: 0px;<br /> clear: both;<br /> }<br /> .navlinks {<br /> padding: 10px 2px 10px 2px;<br /> }<br /> .navlinks .title {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: bold;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: dotted;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #E7E2DC;<br /> padding: 3px;<br /> }<br /> .navlinks ul {<br /> padding: 0px;<br /> margin: 0px 0px 20px 0px;<br /> list-style-type: none;<br /> margin: 0px 0px 20px 0px;<br /> }<br /> .navlinks li {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-align: left;<br /> line-height: 150%;<br /> margin-top: 10px;<br /> }<br /> .navlinks .item {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-align: left;<br /> line-height: 150%;<br /> margin-top: 10px;<br /> margin-bottom: 10px;<br /> }<br /> #calendar {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> line-height: 150%;<br /> padding: 2px;<br /> margin-bottom: 20px;<br /> }<br /> #calendar table {<br /> width: 100%;<br /> padding: 2px;<br /> border-collapse: collapse;<br /> border: 0px;<br /> }<br /> #calendar caption {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: bold;<br /> text-align: center;<br /> text-transform: uppercase;<br /> padding: 3px;<br /> }<br /> #calendar th {<br /> font-weight: normal;<br /> text-align: center;<br /> }<br /> #calendar td {<br /> text-align: center;<br /> }<br /> .image {<br /> text-align: left;<br /> margin-bottom: 20px;<br /> }<br /> .navlinks img {<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> }<br /> #album-container {<br /> width: 986px;<br /> padding: 0px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> margin-right: auto;<br /> margin-left: auto;<br /> -webkit-border-radius: 20px 20px 20px 20px;<br /> -moz-border-radius: 20px 20px 20px 20px;<br /> border-radius: 20px 20px 20px 20px;<br /> }<br /> #album-content {<br /> float: left;<br /> width: 680px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> -webkit-border-radius: 0px 0px 20px 20px;<br /> -moz-border-radius: 0px 0px 20px 20px;<br /> border-radius: 0px 0px 20px 20px;<br /> <br /> }<br /> #album-nav {<br /> float: left;<br /> width: 306px;<br /> background-color: #FFFFFF;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> }<br /> .albumbody {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> padding: 10px;<br /> text-align: left;<br /> line-height: 150%;<br /> }<br /> .albumcol {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> padding: 10px 2px 10px 2px;<br /> text-align: left;<br /> line-height: 150%;<br /> }<br /> .albumcol h3 {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: bold;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: dotted;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #E7E2DC;<br /> margin-bottom: 10px;<br /> padding: 3px;<br /> }<br /> .albumbody h2 {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #345E9B;<br /> font-size: medium;<br /> font-weight: bold;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: dotted;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #E7E2DC;<br /> margin-bottom: 10px;<br /> padding: 3px;<br /> }<br /> .albumbody img {<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> }<br /> .albumcol img {<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #000000;<br /> margin: 0px;<br /> }<br /> .albumbody p {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> line-height: 150%;<br /> margin-bottom: 10px;<br /> }<br /> .albumcol p {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> line-height: 150%;<br /> margin-bottom: 10px;<br /> }<br /> .clear {<br /> clear: both;<br /> height: 0px;<br /> line-height: 0px;<br /> }<br /> ul.tagcloud {<br /> text-align: left;<br /> margin-top: 10px;<br /> }<br /> ul.tagcloud li {<br /> line-height: 200%;<br /> display: inline;<br /> margin-right: 0.5em;<br /> }<br /> ul.taglist {<br /> text-align: left;<br /> padding: 0px;<br /> margin-left: 0px;<br /> }<br /> ul.taglist li {<br /> line-height: 200%;<br /> display: inline;<br /> margin-right: 0.5em;<br /> }<br /> .relatedlinks .title {<br /> font-weight: bold;<br /> }<br /> .blogbody h3 a {<br /> color: #345E9B;<br /> text-decoration: none;<br /> }<br /> .albumcol ul {<br /> padding: 0px;<br /> margin: 0px 0px 20px 0px;<br /> list-style-type: none;<br /> margin: 0px 0px 20px 0px;<br /> }<br /> .albumcol li {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-align: left;<br /> line-height: 150%;<br /> margin-top: 10px;<br /> }<br /> .breadcrumb {<br /> margin: 0px 0px 10px 0px;<br /> font-size: x-small;<br /> }<br /> .breadcrumb div {<br /> display: inline;<br /> }<br /> .navlinks .item em {<br /> text-decoration: none;<br /> }<br /> .mainphoto {<br /> padding: 0px 0px 10px 0px;<br /> }<br /> img.bullet {<br /> margin: 0px 5px 0px 0px;<br /> vertical-align: middle;<br /> border: none;<br /> }<br /> .mainphoto img {<br /> max-width: 640px;<br /> max-height: 640px;<br /> width: expression(this.width &gt; 640 ? 640: auto);<br /> height: expression(this.height &gt; 640 ? 640: auto);<br /> }<br /> .mainphoto .navphoto {<br /> font-size: x-small;<br /> text-align: center;<br /> margin: 0px 0px 5px 0px;<br /> }<br /> .albumcover {<br /> float: left;<br /> padding: 0px 5px 5px 0px;<br /> }<br /> .albumcover img {<br /> max-width: 320px;<br /> max-height: 320px;<br /> width: expression(this.width &gt; 320 ? 320: auto);<br /> height: expression(this.height &gt; 320 ? 320: auto);<br /> }<br /> .albumbody .itemfooter {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: x-small;<br /> font-weight: normal;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> margin-bottom: 25px;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> padding: 0px;<br /> clear: both;<br /> }<br /> img.gravatar {<br /> float: left;<br /> margin: 0 5px 5px 0;<br /> border: 1px solid black;<br /> }<br /> .albumbody h3 {<br /> font-family: Arial, Helvetica, sans-serif;<br /> color: #616161;<br /> font-size: small;<br /> font-weight: bold;<br /> font-style: normal;<br /> text-transform: none;<br /> text-align: left;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> margin-bottom: 10px;<br /> padding: 0px;<br /> }<br /> .albumbody h3 a {<br /> color: #616161;<br /> text-decoration: none;<br /> }
M
j'ai oublié de te mettre le script<br /> body {<br /> margin: 0px 0px 0px 0px;<br /> text-align: center;<br /> background: #C9C9C9 url(":url:storage.canalblog.com/38/64/840937/63943538.jpg") no-repeat 0 0;<br /> }<br /> #container {<br /> width: 1086px;<br /> padding: 0px;<br /> background-color: #141414;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> margin-right: auto;<br /> margin-left: auto;<br /> }<br /> #content {<br /> float: left;<br /> width: 580px;<br /> background-color: #141414;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> }<br /> #rightbar {<br /> float: left;<br /> width: 306px;<br /> background-color: #DBDBDB;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> }<br /> #leftbar {<br /> float: left;<br /> width: 200px;<br /> background-color: #DBDBDB;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> overflow: hidden;<br /> }<br /> #topbar-logo {<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> background:#C9C9C9 url(":url:storage.canalblog.com/38/64/840937/63943538.jpg") no-repeat 0 0;<br /> height: 150px;<br /> display: block;<br /> }<br /> div .logolink a {<br /> display: block;<br /> text-decoration: none;<br /> width: 100%;<br /> height: 150px;<br /> }<br /> #topbar {<br /> background-color: #;<br /> border-top-style: none;<br /> border-right-style: none;<br /> border-bottom-style: none;<br /> border-left-style: none;<br /> border-width: 1px;<br /> border-color: #;<br /> padding: 10px;<br /> display: none;
M
je reviens jai voulu remodifier et jai fait une banniere sur phoyofiltre (800*150) et ca me plait!! maintenant que je veux l'inserer ca beug car maintenant toute mon image de fond a disparue et ma banniere est décalee pourtant ja itout suivie a la lettre<br /> <br /> je t'en prie aide moi!! merci d'avance
J
Bonjour !<br /> <br /> J'ai réussis à insérer une photo dans ma bannière mais je ne sais pas où écrire ( parce que je suppose qu'on peut écrire des trucs).<br /> Peux-tu m'aider ?<br /> <br /> Merci beaucoup d'avance !!<br /> <br /> Julia
K
Tes explications sont claires. <br /> C'est très clair [:)]<br /> J'ai réussi à mettre cette fichue bannière et je me voyais mal recréer un nouveau modèle en mode normal [Triste ouin] <br /> <br /> merci Alerione pour tes précieux conseils.
Publicité