créer par défaut un espace entre une image insérée et le texte autour (Créer un compte)

  • Statut : non résolu
5 sujets de 1 à 5 (sur un total de 5)
  • Auteur
    Messages
  • #455974
    eldorado
    Participant
    Initié WordPress
    12 contributions

    Bonjour,

    Je souhaiterais pouvoir faire en sorte qu’à chaque fois qu’une image soit insérée, il y ait une sorte d’espace de 5 millimètres autour de son périmètre, afin que le texte publié autour ne soit pas complètement collé sur cette image.

    J’ai déjà installé pleins de thèmes, et ca ne pose pas ce pbm sur tous les thèmes, donc ca doit se régler dans le thème. Connaissez-vous le code à insérer ?

    merci pour votre réponse

    #617049
    eldorado
    Participant
    Initié WordPress
    12 contributions

    voici mon css. Que faut il changer ?

    /*
    Theme Name: Identity
    Theme URI: http://www.blogohblog.com
    Description: A dark colored theme designed for maximum readability. This is a 3-column sleek WordPress theme built around Web 2.0 and is fully validated.
    Version: 1.0
    Author: Jai Nischal Verma
    Author URI: http://www.blogohblog.com
    */

    /**************** Body *********************/
    *{margin:0;padding:0;}
    body {background: #666666; font:0.75em Trebuchet MS; background:url(images/Genetic.gif); color:#333333;}
    #wrapper { width:996px; margin:20px auto;}
    #topper { width:996px; height:11px; background:url(images/topper.gif) no-repeat bottom;}
    #main {width:996px; background-color:#333333;}
    #bottom { width:996px; height:11px; background:url(images/bottom.gif) no-repeat top;}

    /**************** Links *********************/
    a{text-decoration: none;}
    a:link, a:visited{color:#666666;}
    a:hover{color:#000000;}

    /**************** Formatting *********************/
    h2{font-weight:lighter; font:16px Trebuchet MS;}
    h2 a:link,h2 a:visited{ color: #333333; text-decoration:none;}
    h2 a:hover{color: #000000;}
    h2.search {font-weight:bolder;}

    /**************** Header *********************/
    #header {width:996px; height:120px; background:#333333 url(images/banner.png) center no-repeat;}
    #header h1 {font-size:30px; padding-left:45px;padding-top:30px; font-style:italic;}
    #header h3 {font-size:11px; background:url(images/tagline.gif) repeat-y left; margin-left:48px; padding:6px; color: #ffffff; font-weight:lighter;}
    #header h1 a {display:block; color: #ffffff;}

    /**************** Navigation *********************/
    #navigation {width:600px; height:29px; padding-left:10px; margin:0; }
    #menu ul{list-style-type: none;margin: 0;padding: 0;}
    #menu ul li{float: left;margin: 0 5px 0 0;height: 29px;overflow: hidden;background: url(images/tab_right.gif) no-repeat right top;display: inline;}
    #menu ul li a{display: block;padding: 7px 10px 10px;text-decoration: none;background: url(images/tab_left.gif) no-repeat;color:#FFFFFF;text-decoration: none;}
    #menu ul li a:hover{ color:#CCCCCC;}
    #menu ul li.current_page_item{background: #fff url(images/tab_right_current.gif) no-repeat right top;}
    #menu ul li.current_page_item a{background: url(images/tab_left_current.gif) no-repeat;color:#000;}

    /**************** Leftside *********************/
    #left {width:600px; background-color:#333333; margin-left:42px; float:left;}
    #blogtop {width:600px; height:22px; background:url(images/entrytop.gif) bottom no-repeat;}
    #blog {width:600px; background-color:#FFFFFF;}
    #blogbottom {width:600px; height:10px; background:url(images/entrybottom.gif) bottom no-repeat; margin-bottom:10px;}

    /**************** Entry *********************/
    #entry {padding:0px 20px 0 20px; text-align:justify; min-height:220px;}
    #entry h2{padding-bottom:6px;padding-top:20px;}
    #entry p{padding:0 0 10px 0;}
    .post{padding-bottom:30px; text-align:justify; border-bottom:1px dotted #E2E2E2;}
    html>body #entry ul { margin-left: 0px; padding: 0 0 0 30px; list-style: none; padding-left: 10px; text-indent: -10px; }
    html>body #entry li { margin: 7px 0 8px 10px; }
    #entry ul li:before{ content: « 0BB 020 »; }
    #entry ol { padding: 0 0 0 35px; margin: 0; }
    #entry ol li { margin: 0; padding: 0; }

    /**************** Comments *********************/
    #comments {font-weight:lighter; font-size:11px; padding-top:10px; border-top:1px solid #CCCCCC; margin-top:10px;}
    .commentlist{padding:20px;}
    .commentlist li {margin-bottom:10px;}
    #author, #email, #url {color: #333333;width:30%;border:1px solid #333333;margin-bottom:0.6em; font-size:11px; background:#fcfcfc;margin-top:1px;padding:2px;}
    #submit{margin-bottom:15px;margin-top:5px;padding:0;font-size:11px; background-color:#585858; color:#FFFFFF; border:1px solid #585858;font:1em Trebuchet MS;}
    #respond{padding-top:20px;padding-bottom:10px; font-weight:lighter;font-size:11px; }
    #comment{width:60%;border:1px solid #333333;color:#333333;font:11px Trebuchet MS; padding:2px;}

    /**************** Rightside *********************/
    #right {width:330px; float:left;}
    #sidetop{ background:url(images/sidebar_top.gif) bottom no-repeat;height:10px; width:300px;margin-left:10px;}
    #search{ background-color:#585858; height:40px; width:300px; margin-left:10px; text-align:center;}
    #bar{ border-left:1px dotted #CCCCCC; background:#ffffff url(images/midbar_right.gif) right top no-repeat; height:194px; width:330px;}
    .bar {padding:10px 30px 30px 30px;}
    #sidebar{ background-color:#585858; width:300px;margin-left:10px;}
    .sidebar {padding:10px;}
    #sidebottom{background:url(images/sidebar_bottom.gif) bottom no-repeat;height:10px; width:300px;margin-left:10px;}

    /**************** Sidebars *********************/
    #sidebar1{ width:120px; float:left; border-right:1px dotted #666666; padding-left:5px;padding-right:7px;}
    #sidebar1 a {color:#FFFFFF;}
    #sidebar1 a:hover {color: #000000;}
    #sidebar1 h2{font-weight:normal;color:#CCCCCC; font-size:12px;}
    #sidebar1 ul{list-style-type:none;}
    #sidebar1 ul li{list-style-type:none;margin-top:20px;}
    #sidebar1 ul li ul{font-style:normal;list-style-type:none;margin-top:10px;}
    #sidebar1 ul li ul li{display:block; margin:1px; padding:4px;font-size:11px; background:url(images/tagline.gif) repeat-y;}
    #sidebar1 ul li ul li:hover{background-color: #FFFFFF;background:url(images/tagline_reverse.gif) repeat-y;}
    #sidebar1 ul li ul li:hover a{color: #cccccc;}
    #sidebar1 p{padding:0 5px;}

    #sidebar2{ width:140px; float:right;}
    #sidebar2 a {color:#FFFFFF;}
    #sidebar2 a:hover {color: #CCCCCC;}
    #sidebar2 h2{font-weight:normal; color:#CCCCCC; font-size:12px;}
    #sidebar2 ul{list-style-type:none;}
    #sidebar2 ul li{list-style-type:none;margin-top:20px;}
    #sidebar2 ul li ul{font-style:normal;list-style-type:none;margin-top:10px;}
    #sidebar2 ul li ul li{display:block; margin:1px; padding:4px;font-size:11px; background:url(images/tagline.gif) repeat-y;}
    #sidebar2 ul li ul li:hover{background-color: #FFFFFF;background:url(images/tagline_reverse.gif) repeat-y;}
    #sidebar2 ul li ul li:hover a{color: #cccccc;}
    #sidebar2 p{padding:0 5px;}

    /**************** Search *********************/
    #topsearch{padding-top:2px;}
    #topsearch input[type= »text »]{ border:1px solid #585858; width:17em; color: #333333;font:1em Trebuchet MS, Arial, sans-serif;padding:5px; margin-bottom:3px;}
    #topsearch input[type= »submit »]{ border:1px solid #585858; color: #333333;font:1em Trebuchet MS;padding:0px; margin:0;}

    /**************** Footer *********************/
    #footer{color:#ffffff; background-color:#333333; width:996px;}
    #footer a:link, #footer a:visited{color:#CCCCCC;}
    .copyright {padding:5px 5px 5px 45px;background-color:#333333;}

    /**************** Misc *********************/
    acronym, abbr, span.caps { cursor: help; }
    acronym, abbr { border-bottom: 1px dashed #999; }
    blockquote { margin: 15px 30px 10px 10px; padding-left: 20px; border-left: 5px solid #ddd; }
    blockquote cite { margin: 5px 0 0; display: block; }
    .center { text-align: center; }
    hr { display: none; }
    a img { border: none; margin:5px;}

    #img {margin: 5px;}

    img.centered{display:block;margin-left:auto;margin-right:auto;}
    img.alignright{display:inline;margin:0 0 2px 7px;padding:4px;}
    img.alignleft{display:inline;margin:0 7px 2px 0;padding:4px;}
    pre {border: solid 1px #9a9a9a;color: blue;margin: 10px;padding:10px;background: #f3f2ed}
    code {font-size:1.0em;color: #000}
    .sub_email {border:1px solid #585858; width:14em; color: #333333;font:0.8em Trebuchet MS, Arial, sans-serif;padding:2px;}

    #617050
    LePoulot
    Membre
    Padawan WordPress
    87 contributions

    Dans ton Css, au lieu de

    #img {margin: 5px;}

    met juste

    img {margin: 5px;}

    img n’est pas une class donc pas de # … c’est juste une balise comme a, hr, body …etc

    #617048
    lordphoenix
    Membre
    Chevalier WordPress
    102 contributions

    Sauf qu’a faire ça ça va s’appliquer à toutes les images et ça risque donc de foutre en l’air pas mal de chose dans le thème.

    Par contre à ce que je vois dans ton css tu as des class toutes faites pour aligner tes images comme tu veux il te suffit de les utiliser quand tu inséres des images dans un billet.
    ce sont les lignes img.centered img.alignright et img.alignleft qui sont vers la fin de ta feuille de style. Il te suffit donc d’ajouter class= »alignrigth » par exemple dans la balise img qui correspond à l’image que tu ajoutes dans ton billet.

    #617051
    zilizozo
    Participant
    Initié WordPress
    2 contributions

    J’ai aussi un souci avec mon template. C-dessous je vais le coller et est ce que quelqu’un peut me dire ce que je dois changer pour que lorsque j’insère une image, le texte vienne se mettre tout au tour? Je vous remercie déjà d’avance.

    wordpress 2.5
    Theme: branfordmagazine

    Avec un autre thème cela se fait automatiquement, je suppose donc que c’est le style.css qu’il faut modifier!

    Vous pouvez me repondre par mail aussi: zilizozo@gmail.com

    Cordialement,
    Zilizozo

    The CSS, XHTML and design is released under GPL:
    http://www.opensource.org/licenses/gpl-license.php

    Credits
    =======

    Thanks to Darren Hoyt and his « Mimbo » theme which has been a great inspiration
    and a good source for lots of the code I used for this theme especially the intensive
    use of custom fields.

    Thanks to Brian Gardner and « Revolution » which inspired me to put the two additional
    page layouts « Featured Page » and « 3-Column-Page » into the theme.

    Thanks to Patrick Griffiths who delivered the script for the dropdown menues.
    http://www.htmldog.com/articles/suckerfish/dropdowns/

    I�d also like to thank Klaus Hartl (stilbuero.de) for the brilliant script I used
    for the tabbed section with the fade effect.

    And last but not least my very special thanks go out to all of you out there
    using the theme and sending me tons of emails telling me how great this theme is.

    THANK YOU ALL!!!

    /******************************************
    * HTML Elements
    ******************************************/

    * {
    margin:0;
    padding:0;
    }

    body,html {
    min-height:101%;
    }

    body {
    background: #333;
    color: #333;
    padding: 13px 0 25px 0;
    }

    body, select, input, textarea {
    font: 12px Arial, Verdana, Sans-Serif;
    line-height:1.5em;
    }

    p {
    margin: 15px 0;
    }

    a:link, a:visited {
    color: #333;
    text-decoration:none
    }

    a:hover, a:active {
    color:#333;
    text-decoration:underline;
    }

    hr {
    display: block;
    height:1px;
    background:#333;
    border:0;
    }

    small {
    font-size: 0.9em;
    padding:3px 6px;
    }

    /****** Images ****************************/

    img, a:link img, a:visited img{border:1px solid #999; padding:1px;}
    img.left,img.center,img.right,img.norm{ margin:5px 12px 5px 0; border:1px solid #999; padding:1px;}
    img.left{ float:left; margin:0 12px 5px 0; }
    img.center{ display:block; margin:0 auto 5px auto; }
    img.right{ float:right; margin:0 0 5px 12px; }
    img align left{ float:left; margin:0 12px 5px 0; }

    /******************************************
    * General Structure
    ******************************************/

    #page { /*the main container*/
    width:880px;
    margin:0 auto;
    font-size:1em;
    background:#FFF;
    padding: 10px 25px 35px 25px;
    border:3px double #333;
    }

    #branding {/*where the logo sits*/
    width:625px;
    height:100px;
    padding-bottom:15px;
    background:url(images/backgrounds/bg_branding.png) no-repeat;
    }

    .left {
    float:left;
    }

    .right {
    float:right;
    }

    #sidebar {/*you guessed it: it�s the sidebar container*/
    width: 250px;
    float:right;
    }

    #leftcol {/*the left homepage column carrying the « Featured Article » section*/
    width:287px;
    border-right:1px solid #b6b6b6;
    padding-right:18px;
    }

    #leftcol, #rightcol {
    margin-top:10px;
    float:left
    }

    #rightcol {/*actually the column in the middle of the homepage (if the right column is the sidebar)*/
    width:277px;
    padding-left:18px;
    margin-top: -2px;
    text-align:justify;
    }

    /******************************************
    * Sidebar
    ******************************************/

    .subnav li {/*.subnav is mainly the categories list*/
    list-style:none;
    }

    .subnav li a:link, .subnav li a:visited {
    background: #fff;
    display:block;
    padding:4px 4px 4px 20px;
    border-bottom: 1px solid #999;
    }

    .subnav li a:hover, .subnav li a:active {
    background: #F4F4EC;
    text-decoration:none;
    }

    #sidelist li {
    list-style:none;
    }

    .bullets li {
    margin:0 0 5px 15px;
    list-style:square;
    }

    #sidelist .bullets li {
    list-style:square;
    margin-bottom:5px;

    margin-left:22px;
    }

    #sidelist .children {
    background:#F4F4EC;
    }

    #sidelist .children li {
    background: #F4F4EC;
    list-style: none;
    margin-left:15px;
    padding-left:15px;
    border-bottom:1px solid #fff;
    }

    #sidelist .children li a, #sidelist .children li a:visited {
    padding:2px 2px 2px 0px;
    border:0;
    background:#F4F4EC;
    color: #666;
    }

    #sidelist .children li a:hover, #sidelist .children li a:active {
    color:#000;
    }

    #sidelist .feed li{
    margin-bottom:5px;
    padding-left:20px;
    background:url(images/rss.gif) no-repeat;
    }

    /******************************************
    * Headlines
    ******************************************/

    .blogtitle, .blogtitle a {
    color: #000;
    font-size: 1.8em;
    font-family: Georgia, « Times New Roman », Times, serif;
    font-weight: regular;
    padding: 20px 0px 10px 0px;
    }

    h1 {
    color: #840000;
    font-size: 1.8em;
    font-family: Georgia, « Times New Roman », Times, serif;
    font-weight: bold;
    margin: 0px 10px 0px 0px;
    padding: 20px 0px 0px 10px;
    }

    h2 {
    color: #840000;
    font: 1.8em Georgia, « Times New Roman », Times, serif;
    padding-bottom:8px;
    border-bottom:1px solid #666;
    margin: 20px 0;
    }

    h3 {
    font: 0.9em Arial, Helvetica, sans-serif;
    text-transform:uppercase;
    letter-spacing:0.3em;
    margin-bottom:4px;
    font-weight:bold;
    color:#840000;
    }

    #sidebar h2, #sidebar h3 a {
    font: 0.9em Arial, Helvetica, sans-serif;
    letter-spacing:0.3em;
    text-transform:uppercase;
    margin-bottom:4px;
    font-weight:bold;
    color:#840000;
    }

    #sidebar h3, #sidebar h2 {
    font-size:0.9em;
    border-top:3px double #999;
    border-bottom:1px solid #999;
    padding:5px 0 5px 2px;
    margin:20px 0 15px 0;
    color:#840000;
    }

    h3#respond {
    font-size:1.1em;
    border-top:1px solid #666;
    margin-top:25px;
    padding-top:20px
    }

    h3#comments {
    margin-top:32px
    }

    h3 a:link, h3 a:visited {
    color: #666;;
    }

    h4 {
    font-size:1.2em;
    margin-bottom:6px;
    }

    /******************************************
    * Content
    ******************************************/

    #content {
    width:605px;
    float:left
    }

    .description {
    font-size: 1.3em;
    font-weight: bold;
    color:#999;
    }

    /* Featured Articles formatting « leftcol » */

    .feature {
    background: url(images/backgrounds/bg_featured.jpg) repeat-x #F4F4EC;
    padding:15px;
    border: 1px solid #ccc;
    }

    .feature p, #rightcol p { margin:0; }

    #leftcol img, #rightcol img {
    padding:1px;
    border:1px solid #999;
    }

    #leftcol .feature { margin-bottom: 15px; }

    /* Formating of the Leadstory stuff in the tabbed section */

    #leadpic {
    float:left;
    margin: 0 18px 8px 0;
    padding:1px;
    border: 1px solid #999;
    }

    .title, a.title {
    font-family: Georgia, « Times New Roman », Times, serif;
    font-size:1.1em;
    font-weight:bold;
    color: #840000;
    letter-spacing:normal;
    }

    #lead p {
    margin-bottom:10px;
    }

    /* Formating of « rightcol » which is the column in the homepage middle 😉 */

    #rightcol img {
    float:left;
    margin:3px 10px 4px 0;
    }

    #leftcol img {
    margin-bottom: 4px;
    display:block
    }

    #rightcol .clearfloat {
    border-bottom:1px solid #999;
    padding:12px 0;
    }

    /* Post Formatting */

    .entry {
    padding-bottom:28px;

    text-align:justify;
    }

    .post blockquote {
    color:#666;
    background:#F4F4EC;
    padding:6px 14px;
    margin:18px 35px;
    border-right:1px solid #DDD;
    border-bottom:1px solid #DDD;
    }

    .post ul li {
    list-style:square;
    margin-bottom:5px;

    margin-left:42px;
    }

    .post ol li {
    margin-bottom:5px;

    margin-left:48px;
    }

    #tags {
    padding:3px;
    border-bottom:1px solid #DDD;
    border-top:1px solid #DDD;
    }

    .postmetadata {
    font-size:0.9em;
    margin:0 0 10px 0;
    padding:5px 10px;
    background:#F4F4EC;
    border-top:1px solid #E6E3D3;
    border-bottom:1px solid #E6E3D3;
    }

    /* Form Elements */

    select {
    background:#f2f2f2;
    border:1px solid #9c9c9c;
    width:100%
    }

    #searchform { padding:16px 5px 0 0; }

    .button {
    padding: 1px;
    background:#333;
    color:#fff;
    border:none;
    }

    .button:hover {
    background:#666;
    color:#FFF;
    text-decoration:none
    }

    #commentform input {
    width: 170px;
    margin: 5px 5px 1px 0;
    }

    #commentform textarea {
    width: 100%;
    margin-top:5px;
    }

    /* Comments*/

    .commentlist {
    padding-left:30px;
    }

    .commentlist li {
    margin: 15px 0 3px;
    padding: 8px 15px 10px 15px;
    background:#F4F4EC;
    border:1px solid #E6E3D3;
    }

    #commentform small {
    background:#FFF;
    font-weight:bold;
    padding:0;
    }

    .commentmetadata {
    display: block;
    }

    .commentlist small {
    background:#fff;
    border:1px solid #E6E3D3;
    }

    /* Float Properties*/

    .clearfloat:after {
    display:block;
    visibility:hidden;
    clear:both;
    height:0;
    content: ». »;
    }

    .clearfloat {
    display:inline-block;
    }

    .clearfloat {
    display:block;
    }

5 sujets de 1 à 5 (sur un total de 5)
  • Vous devez être connecté pour répondre à ce sujet.