Preserve aspect ratio of image |
Post Reply |
Author | |
NFS
Newbie Joined: Nov 24 2015 Location: Canada Status: Offline Points: 11 |
Post Options
Thanks(0)
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 |
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
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%. |
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
P.S. To make the background image adapt itself to the size, go to Styles->Personnalisation->Background and choose Size "cover" or "contain".
|
|
NFS
Newbie Joined: Nov 24 2015 Location: Canada Status: Offline Points: 11 |
Post Options
Thanks(0)
|
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 |
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
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
|
|
NFS
Newbie Joined: Nov 24 2015 Location: Canada Status: Offline Points: 11 |
Post Options
Thanks(0)
|
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.
|
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
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.
|
|
NFS
Newbie Joined: Nov 24 2015 Location: Canada Status: Offline Points: 11 |
Post Options
Thanks(0)
|
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.
|
|
NFS
Newbie Joined: Nov 24 2015 Location: Canada Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Used the element group as suggested. Works perfect!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |