Page 1 of 1

image sizing in LC

Posted: Wed Jul 06, 2016 10:48 pm
by ValiantCuriosity
In CSS,I can control the size of any image using ems or percentages.

Inline style examples below:

Code: Select all

<img src="{imageurl}" style="width:5em;height:5em;border:#000;border-style:solid; border-width:thin;">

Code: Select all

<img src="{imageurl}" style="width:50%;height:auto;border:#000;border-style:solid; border-width:thin;">
So, if my image is originally a large one, I can scale it in CSS to resize automatically to the screen size across a variety of devices. That is, 5em will display properly on all devices.

Is there a way to do this in LC?

I can find some references to creating a multitude of image sizes and stack sizes for a variety of devices. I've found some docs on responsive design, but, again, I'm looking for an easier way than those given in the references that I've found. Most of these solutions are based on older versions of LC. I'm thinking that perhaps, LC 8 has some updated way of dealing with device screen sizes.


TIA -Rachel

Re: image sizing in LC

Posted: Thu Jul 07, 2016 1:03 am
by Simon
Hi Rachel,
I'm guessing you are talking about mobile?
Here are some lessons;
http://lessons.livecode.com/m/15262/l/1 ... ll-devices
http://lessons.livecode.com/m/4071/l/15 ... e-an-image
You will see several more image lessons on those pages.

SImon

Re: image sizing in LC

Posted: Thu Jul 07, 2016 2:24 am
by ValiantCuriosity
Thanks Simon,
I'll check the links out and proceed to pester you with more questions.

I'm finding lots to like about LC and many challenges too. :D

-Rachel