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 6643093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:00:32+00:00 2026-05-26T00:00:32+00:00

I am using a UIWebview to display a custom article of information I receive

  • 0

I am using a UIWebview to display a custom article of information I receive from a RSS feed, I’m using CSS to format and style the content. The article in the UIWebview contains a header, image and paragraph, The text of the paragraph wraps around the image on the left then flows underneath it.

<style type="text/css"media="screen">
    h1{
        font-size:20;
        font-family:Helvetica;
    }
    div#content{ 
        width: 400 px;
    }
    div#content img{
        float: right;
        display: inline;
        padding: 0 0 5px 20px;
    }
    p.para{
        font-family:Helvetica; 
        font-size:15px;
    }
</style> 
<div id="content">
    <h1>HEADER</h1>
    <img src="image URL"  style = "width:50; height = 50"></img>
    <p class="para">TEXT GOES HERE</p>
</div>

This all works fine, The trick is, I have multiple UIWebviews all with different sizes, and they all change their sizes when the iPad rotates.
Now, the text in the paragraph that wraps around the image needs to be truncated with an ellipsis when the text reaches the end (bottom) of the UIWebview. I have been searching for two days now on ways to do this and it seems Jquery is the way to go, I have found multiple plugins, Truncator.js,
eTruncate.js, jTruncate.js etc. Many of these plugins truncate to the width of the container, which wont work, some plugins use the fixed height of the container.
My problem is (I think) I would need the plugin to use the container height to work out the truncation point, and the container height needs to be determined by the height of the UIWebview.

I hope this makes sense, This is the first time I’m playing with CSS and jquery so I’m not sure which direction to go in. Is there a truncation plugin that would work best for this scenario and will it work with the CSS I am using at the moment?

Thank you
Brett

  • 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-26T00:00:33+00:00Added an answer on May 26, 2026 at 12:00 am

    To determine the height of your container, which in turn is determined by UIWebview, you could add the following CSS and jQuery:

    CSS

    /* Causes #content to have the full height of the viewport.  This works
       because we've set #content's parents to have 100% height as well. */
    html, body, #content {
        padding: 0;
        margin: 0;
        height: 100%;   
    }
    

    jQuery

    /* Function that could be attached to $(window).resize().  Will give
       you the #content's current height. */
    var getHeight = function() {
        var containerHeight = $('#content').height();
    }
    

    Here’s a demo of it in action (resize the bottom right side window to see it working).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to display the content of PDF files that i receive from a
I'm using UIWebView to display article and one of functionality requirements is text resizing.
I have a UIWebView which I'm using to display a variety of content, sometimes
I want to restrict the users from using the links in a UIWebView. Hence,
I load a UIWebView from a string in a navigation based app. I'm using
I am using UIWebView to display pdf. I wanna handle touch events on webview.
i'm using UIWebview to display a local html page. i tried this text<span><span/>text in
Is there any way to display colorful text in iPhone without using UIWebView Eg
I display text and images in a UIWebView. Content isn't always the same. I
I'm using UIWebView to display text via the method: loadHTMLString:baseURL The HTLMSting is created

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.