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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:24:56+00:00 2026-05-26T03:24:56+00:00

Can html text in p tag is resizable using jquery-ui or without p tag

  • 0

Can html text in p tag is resizable using jquery-ui or without p tag in a div tag is resizable? I have done resizing the image using jquery ui from following example but text is not getting resized http://jqueryui.com/demos/resizable/.

  • 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-26T03:24:57+00:00Added an answer on May 26, 2026 at 3:24 am

    You may use resize event handler. The trick is how to calculate new font size. Check this solution as a variant:

    Html:

    <div id="resizable" class="ui-widget-content">
        <h3 class="ui-widget-header">Resizable</h3>
        <div id="content">Quis non magna sagittis, et cras tortor nunc? Enim, lectus et quis penatibus enim augue eros, dis sit sit urna cras placerat sociis porta</div>
    </div>
    

    Javascript:

    var initDiagonal;
    var initFontSize;
    
    $(function() {
        $("#resizable").resizable({
            alsoResize: '#content',
            create: function(event, ui) {
                initDiagonal = getContentDiagonal();
                initFontSize = parseInt($("#content").css("font-size"));
            },
            resize: function(e, ui) {
                var newDiagonal = getContentDiagonal();
                var ratio = newDiagonal / initDiagonal;
    
                $("#content").css("font-size", initFontSize + ratio * 3);
            }
        });
    });
    
    function getContentDiagonal() {
        var contentWidth = $("#content").width();
        var contentHeight = $("#content").height();
        return contentWidth * contentWidth + contentHeight * contentHeight;
    }
    

    You may look this solution at jsFiddle: jsFiddle link

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

Sidebar

Related Questions

I'm looking for some kind of text-parser for ASP.NET that can make HTML from
I have a service which takes the user supplied rich text (can have HTML
In HTML in the td of a table you can break text by using
How can I do this using CSS and HTML? Bordered text surrounded by colored
I know we can request xml, html as well as text images directly using
How can I can I alter (change, add, whatever) HTML/text real-time using the input
We have the following Solr (3.4) schema for indexing html/text documents: <fields> <field name=text
I am using the following html page: <html> <head> <title>AJAX Example</title> <meta http-equiv=Content-Type content=text/html;
I have a header within the following html page and I can't get the
I have meta tag as given below: <meta http-equiv=Content-Type content=text/html; charset=iso-8859-2/> <meta name=keywords Content=“SAT

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.