In my opinion, direct modification of the DOM elements in an iframe is not possible. Each website has its own unique DOM tree and CSS formatting.
While the iframe website has a different DOM structure, you can consider reading and parsing the source code output of the iframe using PHP to make modifications.
An alternative approach involves utilizing JavaScript as discussed at How to change content of website loaded in iframe?
You could use the following PHP snippet:
$iframe_source = file_get_contents('http://www.example.com/');
Refer to the PHP documentation for more details: https://www.php.net/manual/de/function.file-get-contents.php
After acquiring the iframe's source code, you can modify the DOM structure using your CSS files to format specific elements. This method has both advantages and disadvantages:
Advantages:
- The content of the iframe is indexable.
- Better than using only the iframe element.
- Allows for modification.
- No requirement for JavaScript implementation.
Disadvantages:
- Requires PHP and server permission for file get contents capability.
- Potential issues with dynamic elements within the iframe.
Special Note:
itty.bitty.site represents a unique concept diverging from traditional webpages. Learn more about this innovative technique here: https://github.com/alcor/itty-bitty