Sizing a popup window

I have a popup window in which I want to display any (own) page.
This already works very well, but I'm having problems with the size of the window.

My first attempt was to work with absolute sizes. But that doesn't work with the content. This is exclusively dynamic with HTML template and CSS.

Now I'm trying to design the popup window with HTML.

My concern is:
I call the popup with a fixed width or let it calculate to 90% of the browser window.
The height must be calculated automatically. Depending on the content.

Here is my code for the popup window:

procedure CallPopup( ATitel: String; ABreite, AHoehe: Integer;AFrameClass: TWebBasisFormClass; AParam: TJSArray;
                     APopupResultProc: TPopupResultProc); overload;
  Popup: TWebPopupForm;
  Popup := TWebPopupForm.CreateNew( procedure( AForm: TObject)
             (AForm as TWebPopupForm).FFrame := AFrameClass.CreateNew( 'divFrame', procedure( AForm: TObject)
               TWebBasisForm( AForm).Init( AParam);

  Popup.Caption := ATitel;
  Popup.Popup   := True;
  Popup.Border  := fbDialogSizeable;

  if ABreite < 0 then begin
      ABreite = window.innerWidth;
    ABreite := round(ABreite * 0.9);

  // ??????????????
  if AHoehe < 0 then begin
    Popup.ElementPosition := epRelative;       // ??????????????

  Popup.Width   := ABreite;
  Popup.Height  := AHoehe;    // ??????????????

  window.location.hash := 'subform';

  Popup.ShowModal( procedure( AValue: TModalResult)
                     if AValue = mrOk then
                       APopupResultProc( Popup.PopupResult);

The HTML-Code is not ready:

        <div class="container-fluid">

          <div class="row">
            <div class="col-12"><div id="divFrame"></div></div>
            <div class="col-10"></div>
            <div class="col-1"><a id="aAbbrechen">Abbrechen</a></div>
            <div class="col-1"><button id="btnUebernehmen">Übernehmen</button></div>

Can somebody help me

Did you try to set Popup.HeightStyle := ssAuto?

The TWebForm form has no "HeightStyle". Or is there a special popup form?
I used the “Multiform” demo as a basis.

The way I set the width doesn't work either. Only if I set the width in "dfm" will the shape be displayed as set.
Since we use a lot of external HTML code, our web designer suggested doing everything with Bootstrap/Modal. I'll take a look at it.

HeightStyle should be accessible as public property.

No, not in a TWebForm.
But I now use a fully bootstrap based approach. This is also a bit easier for our web designer.