Jump to content
You're invited! Join our 4.6 Live Event on ZOOM 6/24 ×

Community

[Pages] image float in records


Axel Wers
 Share

Recommended Posts

When I use record's image, in record text (display content) is bottom of image.

Like this:

 

Friday Reaction GIF by The Office

Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text 

Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text 

 

But I want this

 

Friday Reaction GIF by The Office Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text 

 

In Templates → HTML → Display → record I found this

        {{if $record->record_image}}
            <div class="cCmsRecord_image">
                <img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
            </div>
        {{endif}}

I added float: left

        {{if $record->record_image}}
            <div class="cCmsRecord_image">
                <img style="float: left" class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
            </div>
        {{endif}}

 

but didn't work. What is wrong?

 

Link to comment
Share on other sites

Yes, it should float automatically. If it doesn’t work for you, something in your theme might override it. But it’s completely impossible to tell unless you provide a link where we can see it happening. 

The code you showed in the first post also cannot work, since the image sits in the cCmsRecord_image container. Floating it INSIDE it won’t create a float in relation to the text. 

Link to comment
Share on other sites

It's original template without any changes.

I tried even this

        {{if $record->record_image}}
        <div style="float:left">
            <div class="cCmsRecord_image">
                <img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
            </div>
            </div>
        {{endif}}
        <div style="float:right">
        <section class="ipsType_richText ipsContained ipsType_normal" data-controller='core.front.core.lightboxedImages'>{$record->_content|raw}</section>
        </div>

but without any effect, text is still bottom the image. I'll probably give it up, I tried everything possible and nothing.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy