Title: Custom iFrame Width/Height
Last modified: May 19, 2018

---

# Custom iFrame Width/Height

 *  Resolved [F](https://wordpress.org/support/users/mekhtelef/)
 * (@mekhtelef)
 * [8 years ago](https://wordpress.org/support/topic/custom-iframe-width-height/)
 * Great plugin!
 * Could you add an option to customize iFrame width and height?
 * I’d like to use iFrame to force display a desktop version of a webpage on mobile.
   And so far your plugin is the best option to do that easily!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [F](https://wordpress.org/support/users/mekhtelef/)
 * (@mekhtelef)
 * [8 years ago](https://wordpress.org/support/topic/custom-iframe-width-height/#post-10298615)
 * Never mind, I just tried changing iframe width/height and it didn’t work. When
   I check the page on my phone ([link](http://schedule.aalzanki.com/iframe/)) I
   still get the mobile version.
 * If you happen to know a way to force the desktop version on mobile, that would
   be great!
 *  Plugin Author [Alex](https://wordpress.org/support/users/alexdemchak/)
 * (@alexdemchak)
 * [8 years ago](https://wordpress.org/support/topic/custom-iframe-width-height/#post-10334051)
 * Hey, apologies in the delay. Unfortunately I don’t know if there’s a way to really
   do it. There’s a few JavaScript solutions that seem relatively hit or miss:
 * [https://stackoverflow.com/questions/12845445/load-iframe-content-with-different-user-agent?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa](https://stackoverflow.com/questions/12845445/load-iframe-content-with-different-user-agent?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa)
 * [https://stackoverflow.com/questions/42741888/iframe-how-to-force-desktop-view?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa](https://stackoverflow.com/questions/42741888/iframe-how-to-force-desktop-view?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa)
 * It doesn’t seem like “trick an iframe’s useragent/viewport size” has a reliable
   implementation method – but if you find one you’d like implemented I can absolutely
   take a look
 *  Plugin Author [Alex](https://wordpress.org/support/users/alexdemchak/)
 * (@alexdemchak)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/custom-iframe-width-height/#post-10754599)
 * Just a note – As of Content Mask version 1.6, there is a Custom Scripts and Styles
   feature, as well as embedded hooks, that allow you to modify the iframe slightly.
   It wouldn’t address the “trick the viewport” issue, but allows for some simple
   modifications like sizing and adding backgrounds to semi-transparent frames.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Custom iFrame Width/Height’ is closed to new replies.

 * ![](https://ps.w.org/content-mask/assets/icon-256x256.png?rev=1923448)
 * [Content Mask](https://wordpress.org/plugins/content-mask/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-mask/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-mask/)
 * [Active Topics](https://wordpress.org/support/plugin/content-mask/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-mask/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-mask/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/alexdemchak/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/custom-iframe-width-height/#post-10754599)
 * Status: resolved