• Resolved arabrab

    (@arabrab)


    Since this afternoon I’m using the ’15n41n1′-template by Isnaini Dot Com. I really love it, but there’s just one thing I can’t get to work and that’s the oulining of the text around an image.
    I want the space between the image and the text to be 6px, so I fiddled a little in the CSS-file as the supportfile of WP showed me. But to my surprise it didn’t work. Did I do something wrong?? Or am I just being incredably dumb?

    I typed in the css-file:
    img.right{padding: 4px; margin: 6px 6px 6px 6px; display: inline;}

    img.left{padding: 4px; margin: 6px 6px 6px 6px; display: inline;}

    I tried it like I copied it here, and with and . in front it and with # in front of it. None of it worked though.

    Anyone here????

Viewing 9 replies - 1 through 9 (of 9 total)
  • Chris_K

    (@handysolo)

    Are you then editing your <img> tag to include what you’ve added in the style?

    Something like <img class="img.left" etc…>

    Thread Starter arabrab

    (@arabrab)

    It’s sounds stupid, but I’ve no idea what you’re asking me at the moment.

    moshu

    (@moshu)

    Wel, if you have that in your stylesheet, then in the code you should NOT use
    align="left"
    but give the class=”left” to your images.
    .right or .left = they are classes!

    Chris_K

    (@handysolo)

    Classes in CSS don’t “just happen” 🙂 If you want an image tag in your post to use one of those classes you have a small/simple edit to do.

    First, add the image to the post.
    If using the old/non-wysiwyg editor, just edit the html for the img tag and add the class attribute as I illustrated earlier.
    If using the WYSIWYG/RTE editor, click the “html” quick button and add your class to the tag that way.

    Thread Starter arabrab

    (@arabrab)

    So I should put this in my CSS-file:

    .right {
    float: right;
    margin: 6px 6px 6px 6px;
    }
    .left {
    float: left;
    margin: 6px 6px 6px 6px;
    }

    moshu

    (@moshu)

    You could, but what we are trying to say is that in your post you have this:
    <img src="whatever.jpg" align="left"... />

    That code will NEVER use your classes from the CSS, unless you code it correctly:
    img src="whatever.jpg" class="left" ... />

    Thread Starter arabrab

    (@arabrab)

    I got it!!! It worked!!! Now I just have to remember to change the align-tag to class every time I use an image. 🙂

    Thank you!!!!

    pdberger

    (@pdberger)

    Hi. I have a similar problem to Arabrab. Since upgrading to 2.0.2. and using the WYSIWYG esitor there is no space between the image and the text.

    Rather than having to go into the html editor every time and changing the code from “align” to “class” is it possible to change the code in the stylesheet so that “align” works instead?

    I’m guessing the answer is no. In which case, is there a chance that future WYSIWG editors will have a “class” option as well as “align”?

    Best. And thank you for your help.

    stuff

    (@stuff)

    spacing around an image is done with:

    hspace=9 (pixels) sets text 9 pixels horz
    vspace=9 (pixels) sets text 9 pixels vertical

    put your value instead of 9, I use 5 and fround it looks nice.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Text around images’ is closed to new replies.