• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Prevent Muse From Setting "Height" On Parent Div

Community Beginner ,
Sep 16, 2017 Sep 16, 2017

Copy link to clipboard

Copied

Hello community

I have a little issue but with huge repercussions on the website! I'll explain:

I have created a muse widget. Basically it is a dynamic gallery that is populated by an AJAX-PHP script. That means, that the height of the gallery is not known as long as the website is not exported.

My problem is, that every time I drop my widget into muse, it sets up a fixed heigt value (in px) for the parent div containing my widget, even tough my widget is declared as responsive. (If I am right the responsive flag only allows you to manage a responsive width and not a height. Is that right?)

Now, I have done some tests and I've found out, that if I go to "Object - Insert HTML" and drop my HTML code inside, Muse creates a parent div with a "min-height" value instead of the fixed height I told before. I like that! This does not affect my gallery...

How can I reproduce that behavior with my widget? (I've created that widget for my company, so it will not be an option to tell everyone, that they have to manually create an HTML Object every time they want to use that widget.)

Any help is appreciated.

Thanks in advance

Tony

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Sep 16, 2017 Sep 16, 2017

Hi Tony,

If you're using a recent version of Muse (2015.2+) you can set the widget to be responsive in both width and height using the supportedSizePolicies attribute of the HTMLWidget declaration.

I'm not sure if this will fix your issue, however; as you said, the content is dynamic, so the widget doesn't know how high it should be at the point of insertion.

Muse 2017+ has the Boolean outputAsFixedHeight attribute (true by default). That might sort the issue.

David

Creative Muse

Votes

Translate

Translate
Guide ,
Sep 16, 2017 Sep 16, 2017

Copy link to clipboard

Copied

Hi Tony,

If you're using a recent version of Muse (2015.2+) you can set the widget to be responsive in both width and height using the supportedSizePolicies attribute of the HTMLWidget declaration.

I'm not sure if this will fix your issue, however; as you said, the content is dynamic, so the widget doesn't know how high it should be at the point of insertion.

Muse 2017+ has the Boolean outputAsFixedHeight attribute (true by default). That might sort the issue.

David

Creative Muse

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 20, 2017 Sep 20, 2017

Copy link to clipboard

Copied

Thank you so much! It was exactly that flag: outputAsFixedHeight

You saved my nervs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 23, 2018 Apr 23, 2018

Copy link to clipboard

Copied

Can you please tell me where is this option? If I'm right, this will prevent inserted HTML codes from changing their heights, right? If yes, I hope, it'll just crop out the excess part from the HTML and not display scroll bars.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 28, 2018 Apr 28, 2018

Copy link to clipboard

Copied

HrishikeshKokate​ The fix I discussed here is part of the Mucow widget building code, not within Muse itself as an option. It’s documented here: MuCow Documentation.

To fix the height of elements in inserted html code you will need to reference them with CSS.

David

Creative Muse

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 29, 2018 Apr 29, 2018

Copy link to clipboard

Copied

LATEST

Thanks for the info!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines