Experience the difference of "Elite".

I know technically is not OR question.. but maybe someone can help? making widget resize depending on content

BlueMtnCabins
Dec 8, 2019 4:43 PM
Joined Jun, 2016 1115 posts

I do not know how to make the container that has the container that houses the quote widget on my site re sizable based on content (if you have discounts, widget display grows vertically). I have been making the container max height to accommodate all possible line items, but I am thinking there should be a better way. I know it is site specific question, but maybe there is some CSS property I can add that makes widget resize the container that houses it? tx

Chris Hynes
Dec 8, 2019 6:45 PM
OR Team Member Joined Oct, 2012 1400 posts

Usually in web design containers resize automatically -- normal inline or relative positioned ones. You have to specially absolutely position to make it clip the content. The widgets are designed to expand to fit the width available and resize as needed vertically. But if your outer website is absolutely positioned, then the resize won't work and you'll have to reserve enough space for it as you've seen.

The other potential issue is that the widget is itself an iframe, but sometimes site builders like to surround the widget iframe with a second iframe. I had a look at your site design and it looks like that's what's happening here -- there's an absolutely positioned iframe that's wrapping the widget code, so nothing really has a chance to resize (see screenshot).

Is there a way to write the widget embed HTML directly on the page instead of having it nested inside another iframe?

BlueMtnCabins
Dec 8, 2019 7:54 PM
Joined Jun, 2016 1115 posts

Thanks much. They (provider) have canned objects such as html embed into which i insert widget code. i think that one may be absolute. I cant try to write iframe directly on page but dont think it is possible. This is not so much an issue with desktop but on mobile looks strange as I have to allocate a lot of blank space (stretch the container down) in case widget has many lines (like discount codes etc) else the book buttons become hidden if the container is too small.