user3625320
user3625320

Reputation: 15

CSS: Image and text align in wordpress post

I have little problem floating text and image in wordpress post. I want to have little space between text and picture. When I try to make it with merge or padding in css, It does nothing or text goes below pic. please help me, page url: http://uglt.org/new/?p=2224

see pic, how I want to be and how is it: https://i.sstatic.net/wNUxq.jpg

php code:

        <?php if($image) : ?>
        <img class="img-responsive singlepic" src="<?php echo $image ?>"/><div class="singu"><?php the_content(); ?></div>
        <?php endif; ?> 

    <div class="entry-content">

By the way when I try to make these two class into one div It goes below too. Please help me, thank you in advance.

Upvotes: 0

Views: 582

Answers (2)

funforums
funforums

Reputation: 336

Just use the css property:

 margin-right:10px

for example, having the class:

 .rightSpacing {
   margin-right:10px
 }

then you could use

<img class="img-responsive singlepic rightSpacing" src="<?php echo $image ?>"/>

use the number of pixels you might feel necessary, 10 is just an example.

Upvotes: 0

Gray Spectrum
Gray Spectrum

Reputation: 733

Try adding a padding-right to the image element.

Upvotes: 1

Related Questions