BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> Templates
  New Posts New Posts RSS Feed - Preserve aspect ratio of image
  FAQ FAQ  Forum Search   Register Register  Login Login

Preserve aspect ratio of image

 Post Reply Post Reply
Author
Message
NFS View Drop Down
Newbie
Newbie


Joined: Nov 24 2015
Location: Canada
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote NFS Quote  Post ReplyReply Direct Link To This Post Topic: Preserve aspect ratio of image
    Posted: Nov 24 2015 at 4:59am
Newbie question.
I have inserted an image onto one of the pages in the responsive template, inside the existing element group. How can I preserve the aspect ratio of the image as it adapts to different screen widths? I set the width of the image to 100% which appears to make it adapt to the screen width but not sure how to set the height so it will adapt and preserve the aspect.

Thanks
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 9:00am
Hi,

I recommend you to use the Group of Elements with you image as its background, rather than the Image element; in its Properties you can activate a fixed Aspect Ratio then set its width to 100%.
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 9:01am
P.S. To make the background image adapt itself to the size, go to Styles->Personnalisation->Background and choose Size "cover" or "contain".
Back to Top
NFS View Drop Down
Newbie
Newbie


Joined: Nov 24 2015
Location: Canada
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote NFS Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 2:37pm
Thanks for the very quick response!

Setting the background image for the element group is an option but what I would like to do is have the image placed in between two text elements in the group. Is there a way to make the image responsive when placed this way?

Thanks
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 2:43pm
Why don't you want to place a Group of Elements between two text elements?

I think it's possible for the Image element, or even for an inage inserted inside the text, but it's to be seen ohnly if there's real need
Back to Top
NFS View Drop Down
Newbie
Newbie


Joined: Nov 24 2015
Location: Canada
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote NFS Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 2:55pm
I didn't try adding another element group inside the main element group because the notes on the sample page say you can only have one element group in a section. But, I can try this if it will work this way.
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 3:35pm
The note indicates that you should add your content into the sub-group rather than into the external group, and that you should always have this group in each section for the proper functioning (you should not delete it); but other than that, you can put as many groups and sub-groups as you need.
Back to Top
NFS View Drop Down
Newbie
Newbie


Joined: Nov 24 2015
Location: Canada
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote NFS Quote  Post ReplyReply Direct Link To This Post Posted: Nov 24 2015 at 5:09pm
Awesome! Thanks very much for the help! I'll give this a try. I'm really impressed so far with OE! I came from trying to build a site with another visual editor and find OE to be superior in many ways.
Back to Top
NFS View Drop Down
Newbie
Newbie


Joined: Nov 24 2015
Location: Canada
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote NFS Quote  Post ReplyReply Direct Link To This Post Posted: Nov 25 2015 at 3:00am
Used the element group as suggested. Works perfect!Smile
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.