Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7531441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:10:22+00:00 2026-05-30T05:10:22+00:00

I need to dynamically load content from HTML emails into some type of content

  • 0

I need to dynamically load content from HTML emails into some type of content area within my HTML so that it is scaled to fit, exactly the way the native mail apps do for iPhone/Android. I have spent two days Googling and testing to no avail. I’m loading the HTML content (which is often set to width=600 or something nice), but rather than scaling, it is appearing as follows:

iPhone Simulator Example

The HTML is very simple:

<div data-role="page" id="messagedetailpage" data-add-back-btn="true">
    <div data-role="content" id="messagedetailcontainer"></div>
</div>

The sanitized email HTML is loaded into a div (messagedetailcontainer), at which point I’ve tried the following things:

  1. Resize the viewport with: $.mobile.metaViewportContent = “width=device-width, initial-scale=0.5, minimum-scale=0.5, maximum-scale=0,5”;

  2. Call several triggers on the div such as: $(“#messagedetailcontainer”).append(data.msg_body).trigger(‘updatelayout’);

  3. Same as #2, but with ‘create’, ‘resize’, ‘load’, and ‘change’.

  4. $(window).resize();

  5. Scrapping the div and putting it in an iFrame (no luck at all)

  6. I’ve research iScroll, ScrollView, various autoscale.js examples, but nothing seems to fit my need.

I’m starting to wonder if this is even possible. If anyone can help me I will be eternally grateful. I don’t mind being stuck for hours, but once it turns to days it starts to become maddening. And sadly this is a show-stopper for me.

Thanks in advance for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:10:23+00:00Added an answer on May 30, 2026 at 5:10 am

    You could get the width of the view-port and the width of the content, then scale the content down based on a ratio of the two:

    var venderPrefix = ($.browser.webkit)  ? 'Webkit' : 
                       ($.browser.mozilla) ? 'Moz' :
                       ($.browser.ms)      ? 'Ms' :
                       ($.browser.opera)   ? 'O' : '';
    var ratio = $(window).width() / $('#newContent').width();
    $('#newContent').css(venderPrefix + 'Transform', 'scale(' + ratio + ')');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In android app, I need to dynamically generate html and load that into webview
I have a bunch of links that I want to load dynamically within the
Across my application, I need to load a content block into a jQuery UI
I was using jQuery.load() to load a html page's content into a lightbox. The
I have a page that dynamically loads content with the jQuery load() function, so
I have a simple page that loads content dynamically. I use the jQuery load
Question Updated for Bounty In Flash I need to load a dynamically generated XML
I have a grid and I need to dynamically replace a control that resides
I have a GridView that I need to dynamically add TemplateField elements to. My
I have a table of data that I need to dynamically add a column

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.