Intégrer une image de fond à une section

ckvtdn Messages postés 756 Date d'inscription   Statut Membre Dernière intervention   -  
ckvtdn Messages postés 756 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

Sur Oberblog depuis peu avec un pote, nous voulons un peu modifier le design de notre blog et comme chez Overblog, on ne peut que passer par le CSS, nous rencontrons quelques problèmes mineurs, mais étant donné nos compétences peut étendues en matière de webmastering, deviennent majeurs.

Bref, l'idée, c'est de coller une image derrière un article. Un background en quelques sortes, mais seulement pour l'article, pas pour tout le blog.

.article, .page {margin-left:230px; margin-right:200px; margin-top:0px; color:#8A8A8A; text-align: justify; margin-bottom: 25px; padding-top: 70px;}
.article p, .page p {margin:0px;}
.contenuArticle, .pageContent {padding: 10px;}
.afterArticle, .afterPage {font-size: 11px; color:#8A8A8A; margin-top: 15px; padding: 5px 3px; font-weight: normal; font-style: normal; line-height: 15px;}
.plusExtrait a, .afterArticle a {font-size: 12px; text-decoration: underline; color:#8A8A8A; padding: 0 3px; font-weight: normal; font-style: normal;}
.plusExtrait a:hover, .afterArticle a:hover {text-decoration: none; color: #8A8A8A;}
.afterArticle .separator, .plusExtrait .separator {display: none;}
.plusExtrait br, .afterArticle br {clear: both; line-height: 10px; margin: 0; padding: 0;}

.spanRecommend .facebook {padding: 0 8px;}
.before_articles {display: none;}
.beforeArticle, .beforePage {padding:0px; margin: 0px; margin-top: 10px; width:100%; color:#8A8A8A; text-align: left; display: block; font-size: 11px; font-weight: normal; line-height: 15px;}
.beforePage {padding: 0;}
.beforeArticle .date span, .beforeArticle .separator {display: none;}
.beforeArticle .date span.text {display: inline;}
.beforeArticle a {text-decoration: underline; color:#8A8A8A;}
.beforeArticle a:hover {text-decoration: none; color:#8A8A8A;}
.linkTopic {text-transform:lowercase;}
.linkTopic:hover {text-transform:lowercase;}
.titreArticle, .divPageTitle h2 {font-family: 'Georgia'; color: #8A8A8A; font-size: 22px; font-weight: normal; text-decoration: none; margin: 0; display: block;}
.titreArticle:hover, .divPageTitle h2:hover {text-decoration:none; color:#999999;}
.article h2, .divPageTitle h2 {min-height: 20px; margin: 0; margin-top: 5px; line-height: 24px; margin-left: 0px; border-bottom: 3px solid #999999; padding-bottom: 3px;}
.topicTitle {text-decoration:none; color:#514F42; text-transform: uppercase; font-size: 14px; font-weight: bold; line-height: 15px; margin-left: 10px; margin-bottom: 30px; margin-top: 10px;}

.afterReactions {text-align:left; display:block; height: 100px; line-height: 35px;}
.afterReactions .linkAddComment {font-size:100%;}
.afterReactions a {padding: 3px 5px; font-size: 12px; text-decoration: none; color:#333333; font-weight: normal;}
.afterReactions a:hover {text-decoration: underline; color: #333333;}
/*--------------------Liste des articles-------------------------*/

.listArticles {margin-bottom:25px; border:0px none; color:#8A8A8A; margin-top: 10px;}
.resumeArticle {color:#8A8A8A; text-align: justify; padding: 0 5px; margin-top: 10px;}
.listArticles a {font-family: 'Georgia'; color: #8A8A8A; font-size: 22px; font-weight: normal; text-decoration: none; margin: 0; text-decoration: none; }
.listArticles .categorieArticle a, .resumeArticle a {font-size: 11px; text-decoration: underline; color:#8A8A8A; }
.listArticles a:hover {text-decoration: underline; color: #999;}
.listCommentedArticle {}


Vous l'avez peut-être reconnu, c'est le CSS de base Overblog, enfin, juste la partie consacrée aux articles. Et là, comment pouvons-nous procéder pour y insérer une image de fond ?

Merci d'avance à tous ceux qui se pencheront sur notre problème. Et si je ne suis pas assez clair, n'hésitez pas à me faire préciser.

A voir également:

1 réponse

wAxxx Messages postés 421 Date d'inscription   Statut Membre Dernière intervention   46
 
Bonsoir,
Le problème içi c'est que overblog utilise un meme style pour les classes "article" et "page". Pour controuner cette problème remplace la premiere ligne

.article, .page {margin-left:230px; margin-right:200px; margin-top:0px; color:#8A8A8A; text-align: justify; margin-bottom: 25px; padding-top: 70px;}


par celui là :

.article{margin-left:230px; margin-right:200px; margin-top:0px; color:#8A8A8A; text-align: justify; margin-bottom: 25px; padding-top: 70px;}
.page {margin-left:230px; margin-right:200px; margin-top:0px; color:#8A8A8A; text-align: justify; margin-bottom: 25px; padding-top: 70px;}


maintenant ajoute à la classe "article" (.article) un background personalisé, mle code de la classe article devient comme suit:

.article{background:url(chemin_de_votre_image);margin-left:230px; margin-right:200px; margin-top:0px; color:#8A8A8A; text-align: justify; margin-bottom: 25px; padding-top: 70px;}
0
ckvtdn Messages postés 756 Date d'inscription   Statut Membre Dernière intervention   141
 
Ok, je vérifie ça dès que je peux. Merci en tout cas !
0