I'm using D7 and the default image upload field. How do I tack-on the ability to wrap text around the image?

Comments

Dalabad’s picture

Simply add in your css file:

.field-item img {
    float: left;
    padding-right: 5px;
}

I'm not 100% sure, if it's field-item or field-items.

Hope it works with your drupal installation

ithacaindy’s picture

Your suggestion works perfectly.The only problem is I was using a bit of AdaptiveTheme HTML5 code to extract the image's title, displaying it as a caption below. Your code wraps the caption , also. The code uses the figcaption:

<figcaption><?php print $item['#item']['title']; ?></figcaption>

Is there a better way (ie more anchored) to display the default D7 field_image title as a caption?

Dalabad’s picture

The only alternative I know is <img title="Your Caption" src="imagelink">
Or you build yourself a div-container with the image and your caption.

Pizgatti’s picture

Works well, I love when the first thing I try actually does what I want.

bineeshtvr’s picture

Dear Dalabad,

your solution really worked for me. thanks a lot.

srandolph’s picture

Still works
thx

eboss’s picture

How to do the same way for d8 please