• Resolved macamba

    (@macamba)


    Hello all,
    Sorry that I′m bothering you guys but I hope someone can help me with this:
    On my website https://www.macamba.nl I′m using the WP Default-theme, Images in a post are to close to the text and I don′t know where in the theme or in the CSS I need to change this, maybe someone knows?
    So what I mean is that I want to create a little bit more space between an image and the text, if you open my site you′ll notice that. I think its called a margin.
    Thanks!!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Look at your themes/default/style.css file. It has instructions in it for using classes listed there…

    Thread Starter macamba

    (@macamba)

    Ok thank you Yosemite,
    I checked that but it says this, could you (or anyone) explain me where I need to add or change something, sorry, but thanks for you help

    /* Using ‘class=”alignright”‘ on an image will (who would’ve
    thought?!) align the image to the right. And using ‘class=”centered’,
    will of course center the image. This is much better than using
    align=”center”, being much more futureproof (and valid) */

    img.centered {
    display: block;
    margin-left: auto;
    margin-right: auto;
    }

    img.alignright {
    padding: 4px;
    margin: 0 0 2px 7px;
    display: inline;
    }

    img.alignleft {
    padding: 4px;
    margin: 4px 7px 2px 5px;
    display: inline;
    }

    .alignright {
    float: right;
    }

    .alignleft {
    float: left

    Try adding class=”alignleft” to your post that contains:
    <img id="image386" title="English" alt="English" src="https://www.macamba.nl/wp-content/uploads/EN.voorbeeld.JPG" align="left" />

    Note: Replace the align=”left” with class=”alignleft”

    Thread Starter macamba

    (@macamba)

    Ok thanks, I changed the HTML like you told me, and it seems to work but the thing is, isn′t there a way to just fix this one time without editing the HTML everytime for every image?

    And is my CSS is:

    img.alignleft {
    padding: 4px;
    margin: ?1px ?2px ?3px ?4px;
    display: inline;
    }

    what should I fill in at the “?”
    Step 1 is the top? 2 is right 3 bottom and 4 left? Or doesn′t go clockwise?

    Thanks for your support!!!

    Thread Starter macamba

    (@macamba)

    Im 2 words: how can I change wordpress to always make my posts/html with: class=”alignleft”
    And NOT like it′s doing now: align=”left”
    This shold be the solution?!

    Yes, the margin, padding and border (colour, width and style) properties all go clockwise in CSS: top, right, bottom, left.

    Are you using the Rich Text Editor to align your images? Without editing the javascript source code, I’m afraid the only way to do this is to make posts in plain text, so you have to enter all the HTML manually.

    Thread Starter macamba

    (@macamba)

    Ok thanks!!

    Yes I′m using the rich editor, works pretty well normaly..
    Do you know wich file I need to “hack”, it′ll be just replacing some code.. same thing as with plugin-problems.
    And thanks so far!!

    Might try the ImageManager plugin. It allows you to define a class right in the image selection/preparation stage.

    Thread Starter macamba

    (@macamba)

    Thanks Yosemite Thats it!
    Its working great! Thanks!!!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘CSS and Images’ is closed to new replies.