Issue #1832💬 AnsweredOpened February 26, 2019by sakshigarg91 reactions

Div not resizing automatically on resizing image when using flex

快速解答by NicoEngler1

This is most likely not a problem with grapejs but rather css. Could you set a up a demo?

Read full answer below ↓

Question

This is my code wherein I want the logo-image to be resizable. Also, I want a div element at the other extreme end so that the user may drag and drop the logo into that container. To have that arrangement, I'm using flex display with justify-content as space-between. But with flex the background doesn't resize automatically. If I remove the flex styling, then it works alright, but my div then is not visible inline in the extreme right corner, the way I want it to.

<div class="padding-left-small blue-background">
            <div class="@Html.RtlClassName() container">
              <div class="padding-bottom-small padding-top-small" style="display: flex; justify-content: space-between" >
                <a class="logo-image" style="">
                  <img data-gjs-type="image" data-gjs-draggable="div[class~='padding-bottom-small']" src="logo.png"></img>
                </a>
                <div style=" width: 61px; height: 61px;"></div>
              </div>
            </div>
          </div>

Answers (2)

NicoEnglerFebruary 27, 2019

This is most likely not a problem with grapejs but rather css. Could you set a up a demo?

lock[bot]March 10, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.