Changing container  height dynamically
Question

Hi,

I have three containers. Black border container contains products. Green container shows it has products above the threshold. Red container show below the threshold. I want to change the container's height according to real-time data. Is it possible to change the height of a container runtime?  I have attached one picture get the scenario clear. Thank you in advance.

Regards,

Amreen

Product Bin.png

mvp_badge
MVP
Solution

Hi Amreen,

Changing the container height can be achieved by using the proper CSS. I've included an example. Clicking the button will resize the container.

ContainerHeightExample.oml

Kilian Hekhuis wrote:

Hi Amreen,

Changing the container height can be achieved by using the proper CSS. I've included an example. Clicking the button will resize the container.

Hi Kilian,

Is it possible to resize the container automatically depending on the amount of text in the container? 


Jolene Kwek wrote:


Hi Kilian,

Is it possible to resize the container automatically depending on the amount of text in the container? 


Isn't that exactly the native behavior of a div?


hi Kilian,

It is reducing the height from bottom, how to do from top?

mvp_badge
MVP

Hi Amreen,

Did you check the code at all? It's so simple, you should be able to come up with that yourself!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.