TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

January 13, 2025, 09:51:39 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,449
  • Total Topics: 21,255
  • Online today: 69
  • Online ever: 6,457 (November 30, 2024, 02:40:09 PM)
Users Online
  • Users: 1
  • Guests: 78
  • Total: 79
  • @rjen

iframes or embedded objects in block codes

Started by Underdog, January 07, 2025, 06:12:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Underdog


I noticed that iframes or embedded objects within HTML or PHP blocks do not display properly for a responsive layout.
Perhaps someone can add JQuery (or vanilla JS for SMF 2.0 if you still support it) that wraps the iframe or object in a div to style it properly for responsive display?

Like an each loop wrapping them in a div with an added class where that class forces it to max out at the width/height of the block body.


Underdog

This is not a big deal because people can add the css to their code to make it adapt to any screen size but I think many people don't know how to do this. It's possible to just use jQuery to insert the css code & make it work for people without the css knowledge, like when they copy/paste iframe content from other websites that they want to include.