# Auto-Size IFRAMEs 🧪

{% hint style="info" %}
UNRELEASED\
This was a part of SA4 we may revive.&#x20;
{% endhint %}

## Auto-Sizing IFrames

**This tool allows you to auto-size IFRAMES to their content.**

### DEMO - Auto-Size IFRAMEs <a href="#demo---auto-size-iframes" id="demo---auto-size-iframes"></a>

The yellow area and lipsum text below are the content of an IFRAME.

Refresh the page to generate new random lipsum text, and watch the IFRAME re-calculate the size accordingly.

The IFRAME is being auto-sized to the content it contains. In this design, it will not truncate the content, or have unnecessary padding below. It also does not require scrollbars.

Automatically sizes the IFRAME to fit its content.

**IFRAME Starts Here**

**IFRAME Ends here.**

* May not work with cross-domain content.
* May not respond to dynamic IFRAME content changes.

## Custom Src Changes

<https://codepen.io/memetican/pen/ZEjxxZP/9f48514d4c34682223a748e0288eed12>

<https://stackoverflow.com/questions/16449445/how-can-i-set-image-source-with-base64>

## ![](/files/v0kxcPolNRj7tbNOq4C8)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://attr.sygnal.com/sa5-html/auto-size-iframes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
