Make TextArea height adjust to fit content

I'm trying to get my TextArea to resize and fit the content
it contains but for some reason the following code causes it to
become about 3x higher than the text it contains. Can someone point
out what I am doing wrong? Thanks!
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:TextArea width="400">
<mx:text>
this is a test this is a test this is a test this is a test
this is a test
this is a test this is a test this is a test this is a test
this is a test
this is a test this is a test this is a test this is a test
this is a test
this is a test this is a test this is a test this is a test
this is a test
this is a test this is a test this is a test this is a test
this is a test
</mx:text>
<mx:creationComplete>
event.target.height = event.target.textHeight;
</mx:creationComplete>
</mx:TextArea>
</mx:Application>

Hi Zak - thanks -
Actually... I have a "background frame" on the master page; I have added a text frame to one of the pages based on the master.
The text frame containing the text expands just fine, but the "background frame" set on the master doesn't.
Any ideas?
cheers
Andrew

Similar Messages

  • Make the height of a tabbed panel content container adjust to the individual tab's content.

    I am designing a site and on one page I am using two tabs to seperate two different kinds of content.  One tab has more content and as such is longer on the page. But I noticed that MUSE uses which ever tab is the longest as the basis for how long the page is. This is fine while on that tab, but on the other tab it makes the page much longer (bunch of dead space) then it needs to be.  Is there a way of getting around this or is this a limitation of muse?
    Take a look at the page here and you will see what I mean. Click on cuff cases and scroll down and you will see what I mean.
    http://pgl0.businesscatalyst.com/accessories---prince-gun-leather.html

    Hi Lukewind,
    This has come up in the forum archive. There is not currently a way to create a tabbed panel with adjustable/variable height content containers. This is not actually a bug in Muse, but it is a feature request. Please create an Idea topic for this feature in the Ideas for Features in Adobe Muse forum (http://forums.adobe.com/community/muse/ideas).
    Here is the content from the archive request:
    Have the depth of tabbed panels adjust to the size of the content.
    The boxes in tabbed panels should be adjustable to the content rather than have all the tabs open in the same size as the biggest text box.

  • Make iframe Webcenter 11.1.1.5 automatically adjust height according to the content

    Hi All,
    Anyone can help me how to make Iframe (application page template) webcenter portal automatically adjust height according to the content?
    Thanks in advance..

    Hi, i've successully done this for my blogging engine.
    I've uses jquery.autoheight.js
    In my page property :
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.js"></script>
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.autoheight.js"></script>
    In my html box :
    <iframe id="myframe" name="myframe" class="autoHeight" width="100%" scrolling="no" marginheight="0" frameborder="0" src="http://www.solutionsip.ca/blog"></iframe>
    This work in Adobe muse. My iframe adjust it self with my blog content.
    Exemple : http://www.solutionsip.ca/blog.html

  • Make iframe automatically adjust height according to the contents without using scrollbar?

    Hello, 
    I am developing the site (www.meninasreais.com.br) and have a doubt. I created the base html - menu, header - in Adobe Muse. I'm trying to insert an iframe that automatically adjust the height according to the content of the blog.
    I tried with various codes, the frame is installed on the same domain as the site and none of them worked. What can I be doing wrong? Thank you.
    The code that was inserted below:
    <script language="JavaScript">
    <!--
    function autoResize(id){
        var newheight;
        var newwidth;
        if(document.getElementById){
            newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
            newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
        document.getElementById(id).height= (newheight) + "px";
        document.getElementById(id).width= (newwidth) + "px";
    //-->
    </script>
    <IFRAME SRC="www.meninasreais.com.br" width="600px" height="200px" id="iframe1" marginheight="0" frameborder="0"onLoad="autoResize('iframe1');"></iframe>

    Hi, i've successully done this for my blogging engine.
    I've uses jquery.autoheight.js
    In my page property :
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.js"></script>
    <script type="text/javascript" src="http://www.solutionsip.ca/lib/js/jquery.autoheight.js"></script>
    In my html box :
    <iframe id="myframe" name="myframe" class="autoHeight" width="100%" scrolling="no" marginheight="0" frameborder="0" src="http://www.solutionsip.ca/blog"></iframe>
    This work in Adobe muse. My iframe adjust it self with my blog content.
    Exemple : http://www.solutionsip.ca/blog.html

  • Make the height of content 100%

    Hello,
    Is there a way within iWeb to make the height of the content 100% (rather than stipulating pixel height) so that a background colour fills the page from top to bottom?
    Thanks,

    Even if you are not using the footer or header for your pages, they are still a part of your pages. You can see the areas delineated on the page with Show Layout turned on.
    Unfortunately, the values that are present in the Inspector Page tab are set at some default which is the same from template to template. You can actually change these discrete areas on your page dynamically but the values in the Inspector won't change unless you change them. Again, unfortuately, this discrepancy can lead to rendering problems once the HTML is generated.

  • Iframe height / style cutting off content in Wordpress plugin

    I have a Wordpress plugin called vCita that I can't get to display correctly - the Submit button is getting half cut off in Chrome, and completely hidden in Firefox:
    http://www.otpinvites.com/contact-3/
    Of course I would like the container's height to adjust to the content, but it seems to be getting cut off by the iframe - I added a style="height:900px;" attribute at the end of this line in the HTML using Chrome developer tools, and this seemed to be the only way to get it to adjust)
    <iframe src="http://www.vcita.com/contact_form?v=82edbfbd" scrolling="no" frameborder="0" id="fitvid407170" style="height:900px;>
    However, a) I can't get it to adjust fluidly/automatically according to the content (resizing the browser window cuts it off again, though the site is otherwise Responsive), b) I'm not sure where I could edit this in Wordpress. I believe the style for this particular item is one of the plugin's default styles that I can't find where to edit, so I suppose I would have to override this style somehow? Is this possible?

    iFrames were not built to be responsive. You can however make them responsive. Take a look at this beautiful jQuery plug-in: http://npr.github.io/responsiveiframe/

  • Are Adobe EVER going to make Edge Animate scale-to-fit (like Flash)?

    I've been following the progress of Edge Animate (formerly Edge) ever since Steve Jobs decided he wasn't having Flash on the iPad.
    With each new version I've been desperately looking for the feature that I consider the most important of all: Scale-to-fit
    There are a couple of discussions already on this forum where people have requested this feature - but both have been sidetracked by replies from people who haven't understood what 'scale-to-fit' is. So let me explain Scale-to-fit:
    I'm talking about the feature in Flash - where if the HTML dimensions are set to 'Percent' - then the resultant movie will scale-to-fit any browser window. Here is an example of what I mean:
    http://www.skippingschool.co.uk
    - try changing the browser size and you'll see the whole frame (graphics and images) scales without changing its proportions.
    When the latest version of Edge Animate came out with its built-in easy-to-follow 'Resize' Lesson, I thought Adobe had finally found an answer. But good though this feature is, it doesn't solve the problem. It's only possible to properly scale-to-fit images - not graphics.
    It's now more important than ever that Adobe finds a solution to this problem. The world is going 'Responsive' - its not just a fad. And 'Responsive' is not just about three columns being squeezed into one. All Responsive sites require images, graphics AND animations to scale-to-fit. So Adobe's tutorial showing how Edge Animate can be added to WordPress sites is of limited use because it won't work for Responsive web sites.
    So please Adobe, will someone tell me if scale-to-fit is EVER going to happen? I don't mind if it's 3 months, 6 months, 9 months down the line - but I need to know if it's worth me sticking with Edge Animate - or whether I should be looking toward HTML5 Canvas or something else for a solution?
    Alternatively, is there some fundamental reason why it can NEVER happen?
    Please tell me? Just put me out of my misery!

    Hi Sarah,
    I hope you don't mind but I played around with your code a bit and managed to get the kind of scale-to-fit behavior that I believe the OP was asking about.  I think the trick is to make sure that you also check whether the scaled height of the stage exceeds the height of the browser window and change the scaling so that it is responsive to changes in both the width and height of the window, whichever is the limiting factor. The code I changed in CompositionReady appears in bold below.  I hope this helps.
    sym.$("#Stage").css({ // Set the transform origin so we always scale to the top left corner of the stage
    "transform-origin":"0 0",
    "-ms-transform-origin":"0 0",
    "-webkit-transform-origin":"0 0",
    "-moz-transform-origin":"0 0",
    "-o-transform-origin":"0 0"
    function scaleStage() {
        var stage = sym.$('Stage'); // Set a reusable variable to reference the stage
        var parent = sym.$('Stage').parent(); // Set a reusable variable to reference the parent container of the stage
        var parentWidth = stage.parent().width(); // Get the parent of the stage width
        var parentHeight = $(window).height(); // Get the browser window height
        var stageWidth = stage.width(); // Get the stage width
        var stageHeight = stage.height(); // Get the stage height
        var desiredWidth = Math.round(parentWidth * 1); // Set the new width of the stage as it scales
        var desiredHeight = Math.round(parentHeight * 1); // Set the new height of the stage as it scales
        var rescaleWidth = (desiredWidth / stageWidth); // Set a variable to calculate the new width of the stage as it scales
        var rescaleHeight = (desiredHeight / stageHeight); // Set a variable to calculate the new height of the stage as it scales
        var rescale = rescaleWidth;
        if (stageHeight * rescale > desiredHeight) // Do not scale larger than the height of the browser window
                        rescale = rescaleHeight;
    // Rescale the stage!
               stage.css('transform', 'scale(' + rescale + ')');
         stage.css(  '-o-transform', 'scale(' + rescale + ')');
               stage.css('-ms-transform', 'scale(' + rescale + ')');
         stage.css('-webkit-transform', 'scale(' + rescale + ')');
               stage.css('-moz-transform', 'scale(' + rescale + ')');
         stage.css('-o-transform', 'scale(' + rescale + ')');
               parent.height(stageHeight * rescale); // Reset the height of the parent container so the objects below it will reflow as the height adjusts
    // Make it happen when the browser resizes
    $(window).on('resize', function(){
               scaleStage();
    // Make it happen when the page first loads
    $(document).ready(function(){
        scaleStage();

  • Javascrip for height adjustment in iframe

    I have an iframe that needs it's height to adjust with the content.  Can anyone help?  here's the link to the page:
    http://www.hermancg.com/html/HermanCG-Plan-Room.html
    This is the iframe code within a div for that same page:
        <!-- InstanceBeginEditable name="mainContent" -->
        <div id="contentArea">
          <div id="contentAreaInteriorLeftiFrame"><img src="../images/Internal-Images-plan-room.jpg" width="150" height="150" /></div>
          <div id="contentAreaInteriorRightiFrame">
            <p class="mainHead">Current Projects Bidding        </p>
            <div id="interiorIframeAreaPlanRoom">
              <iframe src="https://secure.smartbidnet.com/External/PublicBidProjects.aspx?Id=69vvPprMzBuPTg" width="650" height="1300" style="border: solid 0px black;" allowtransparency="true" frameborder="0" scrolling="auto"></iframe>
          </div>
    For now I've just given it enough height to allow for the current content to fit, but the client will continue to add to or delete from that content.  I've tried a few different javascripts I found on the internet, but had absolutely no luck making any of them work.  I'm a designer, so I'm not fluent in code.
    Thanks!
    PBSOakley

    It doesn't take much to get this working.
    #1 Download the iframe resize script from GitHub and save it to the Scripts folder in your Local Site.
    # 2 You need to link your page to the latest jQuery library as well as the resizeIframe.js script which you just downloaded from GitHub.
    #3 Insert the following between the <head> and </head> tags in your HTML document (note path to Scripts folder).
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="Scripts/ResizeIframe.js"></script>
    #4  Add your iframe code after the <body> tag.
    <body>
    <iframe id="FRAME1" name="FRAME1" src="your-page.html" scrolling="no" frameborder="0" allowtransparency="true" width="100%" />
    </iframe>
    your other page content goes here.....
    <!--insert this function immediately above closing </body> tag-->
    <script type="text/javascript">
    jQuery('iframe').iframeAutoHeight();
    </script>
    That's all there is to it.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How do you make html page resize to fit any browser

    Hi All,
    How do you make the html page resize to fit any browser/window both vert and horizontally.
    Thanks!
    Randy

    Horizontally by using percentage width instead of pixels.  This is called a liquid layout.
    http://alt-web.com/TEMPLATES/CSS2-Liquid-Page.shtml
    Vertical resizing is irrelevant in web design.  Page content determines page height.  The more content, the longer the page.  The less content, the shorter the page.  Scrollbars appear when needed.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How do i make a still image (photo) fit the length of the music? I record music and want to put the tracks to a video file with a still image of my business logo in the background. Any help?

    How do I make a still image (photo) fit the length of the music? I record music and want to convert the tracks to a video file with a still image of my business logo in the background. On windows movie maker you could just select "fit to music" but this program isnt as easy to figure out! Any help?

    Double-click on the still image in the project timeline to open the Inspector. In the Inspector, adjust the duration by typing in a new duration to match the length of your music. I think the limit for a still image is 10 minutes. If you need more than this, simply drag the image into the timeline again then adjust its duration. The two images will play seamlessly (no gap will be visible).
    See this iMovie Help topic:
    http://help.apple.com/imovie/#mov3a883915
    You can achieve more precision when entering durations by changing a preference in the menu item iMovie Preferences. Check (tick) the preference for Show Time As HH:MM:SS:frames. This will enable you to enter the duration of stills down to the frame level, rather than full seconds (NTSC is 30 frames per second; PAL is 25 fps). When entering times, type a colon between each time segment, such as 2:50:15, which represents 2 minutes 50 seconds and 15 frames. For 5 seconds 20 frames you would enter 5:20 and so forth.
    Note that the music will only run to the length of the video in the timeline (in your case, the still images). So, after increasing the stills duration you will need to drag the end of the music track as far as required. The stills can be dragged inwards to reduce the duration if necessary.
    John
    Message was edited by: John Cogdell - added Note

  • How to make a huge file size fit

    I have a project which is (sounds silly) about 7 hours. the file sizes arn't that big about 300 meg each but the 0verall project size is 20 gig can I possibly somehow encode this size of project to fit on a 4.7 dvd or should I make one long film in FCP and export that as a QT or something like that......

    You have a couple of options.
    First, consider creating a DVD9 and using AC3 audio - your bitrate would have to be about 2.3Mbps... which is very low, and the visual quality may not be too great.
    Second, instead of using full D1 sizes, use Half D1, which reduces the horizontal resolution and therefore the file size. The visual quality is (IMO) better than VHS and you could encode at slightly over 4Mbps, which is getting acceptable.
    Third, consider making a two disc set. This is not such a bad option as you get to use full D1 encodes at higher resolutions, but of course need to make two DVDSP projects for the content.
    If you went for a double sided and dual layer disc you could achieve the same thing.
    Finally, consider using MPEG1. This has a max data rate of about 1.5Mbps, and so you should easily fit 7 hours on a DVD9... and probably on a DVD5, too (at about 1.4Mbps).
    In all cases, reduce the audio to AC3, no matter what.
    A final option is to be more aggressive with the editing decisions! Cut back on the total amount of footage and get it all on a DVD9 at higher bitrates.
    As a guide, four hours of D1 would need to be encoded at 4.5Mbps to fit on a DVD9, using AC3 audio at 192kbps (a stereo sound track).

  • Dynamic TextArea height in Flex Mobile

    How can I make the height of a TextArea dyanmic as per the amount of text and the scrolls appear fine on Mobile?

    @jeffry
    it surprises me too - but try this: http://polygeek.com/2249_flex_display-html-text-in-the-spark-textarea

  • Fitting Content to Frame to a Path or Mask

    We have been asked by a customer to try and achieve the following:
    They have a number of eps's of a flat screen TV's. For each TV, there is a path around the outside. We will call this Path 1. There is a second path around the screen of the TV. We will call this Path 2.
    Is there a way of placing another image, and fitting content to frame (just like in Indesign), using Path 2 as the bounding box?
    We are using both CS3 and CS4.

    Mark, while Scripts may not be necessary they can add a level of convenience unattainable with Actions.
    As concerns the PAID HELP, the Photoshop Scripting Forum has a couple regulars who, while they may offer their services professionally, still give their advice freely; but in case Adam has no Scripting-experience his needs, should he choose to try a Scripting-solution, might exceed »advice«.
    Having only recently started to appreciate and utilize the capabilities of JavaScript for Photoshop myself I may appear overzealous in advocating it, but everybody will have to decide for themselves if they want to give it a try.
    With possibly hundreds of images I wouldnt want to rely on the screens (or their paths) to all have the same diameter and a Script can allow for that with transforming the placed image according to the height or width so as to always fill the area completely (thus clipping at the top/bottom or left/right depending on the relation).
    And (though too complicated for myself) it would be possible to let Photoshop work off folders and not get stuck by the occasional file that doesnt conform to the naming conventions or lacks a path by ignoring it and documenting unedited files at the end.
    Thats always assuming that the photographs of the tv-sets are fairly frontal, because if they are in perspective then the matter gets much more complicated, but what with the allusion to doing it in Indesign I concluded perspectival transformation isnt required anyway.

  • Tables: Fit Content to Frame

    (InDesign CS2)
    Since "fit frame to content" is available when you select a frame that contains a table, but "fit content to frame" is not...I'm assuming it's not possible to do that.
    I understand that a table can lie well within or outside of its frame, and that can be a nice thing. However, what if I want to make sure the boundaries of the actual table, left to right, take up an EXACT width? Seems like making the frame the exact width I need and then having "fit content to frame" available is what I need.
    Am I missing something? Does anyone have a good workaround?

    Lisa,
    This script will do the job (although the interface is a bit primitive. Just type a number in the units you're using for the horizontal ruler. It displays the "before width" and you can then type the number you want instead. It distributes the extra or the deficit across the existing columns of the table.
    //DESCRIPTION: Set Width of Table
    // by Dave Saunders
    if ((app.documents.length == 0) || (app.selection.length == 0)) { beep() }
    aDoc = app.activeDocument;
    aSel = app.selection[0];
    aTable = findTable(aSel);
    tWidth = prompt("Table width", String(aTable.width));
    if ((tWidth == null) || (tWidth == "")) { exit() }
    n = aTable.columnCount;
    w = aTable.width;
    for (j = n-1; j >= 0; j--) {
      aTable.columns[j].width = aTable.columns[j].width * (tWidth)/w;
    function findTable(obj) {
      if (obj.constructor.name == "Table") { return obj }
      while (obj.constructor.name != "Table") {
        obj = obj.parent;
        if (obj.constructor.name == "Application") {
          errorExit("Can't locate table");
      return obj;
    function errorExit(message) {
      if (arguments.length > 0) {
        if (app.version != 3) { beep() } // CS2 includes beep() function.
        alert(message);
      exit(); // CS exits with a beep; CS2 exits silently.
    To use the script, copy and paste to ExtendScript Toolkit and save with an appropriate name in the form YourName.jsx in the Scripts folder of the Presets folder of your InDesign CS2 folder (you could put it in a subfolder if you wish). Then to run the script, set-up the appropriate initial conditions (click with the text tool in the table) and double-click the script's name in the Scripts palette.
    Dave

  • Fit Content Proportionally Broken in CS6?

    I have been having a lot of issue with Fit Content Proportionally since upgrading to CS6.
    In many of my documents (some new, some pulled in from earlier versions and saved over as CS6), I find that both via the menu and via the keyboard shortcut, the commonly-used and absolutely essential "Fit Content Proportionally" command just simply does not work.
    I can create a bunch of square frames, and then fill them all with various-sized and shaped images, and then when I would usually Fit Content Proportionally to make them all scale down inside the boxes, what I get instead is no response at all. The only way to "fix" the problem is to go to the toolbar with the content selected and change either the vertical or horizontal percentage to any number at all. As long as the proportion lock is in place, then that changes both % numbers to the same number, and thus fixing the problem. This is what makes me think it is a bug.
    Is there some new fitting setting in CS6 that I need to change?
    I have tried saving as IDML and importing back into CS6, but the behavior persists. Interestingly, if I change the fitting via the toolbar % "fix" and then select Fit Content to Frame (not proportionally), then Fit Content Proportionally is broken again, and does nothing at all.
    On most of my documents, Fit Content Proportionally works exactly as expected, and exactly as it always has. Of course my biggest "problem" documents contain large numbers of images.
    High Res Image:
    http://i.imgur.com/kl9jS.jpg

    This is a bug or a big enough change in behavior that it should come with a warning alert the first time you use it. I've replicated it across different 8.0.1 installs and (Mac) OSs.
    To replicate:
    Place graphic. I haven't seen a difference among placed graphic types.
    Resize the graphic frame non-proportionally.
    Object=>Fitting=>Fit Content to Frame, so that the content is scaled non-proportionally. (Or select the content and scale it non-proportionally.)
    Object=>Fitting=>Fit Content Proportionally. Nothing happens. (Or, if you scaled the content without fitting it in the previous step, the content may be centered, and it may be scaled, but the proportions won't be changed.)
    I suppose you could make an argument that this is more correct than the old behavior—the command now means "Fit without changing the proportions"—but it's a big change, and I doubt anybody wants it to work this way.
    Here's a short script that should more or less give the old behavior:
    function fit(item) {
      var i, l, graphic;
      if (item instanceof Group) {
        for (i = 0, l = item.pageItems.length; i < l; i++) {
          fit(item.pageItems[i].getElements()[0]);
      else if (item.hasOwnProperty("imageTypeName")) {
        item.horizontalScale = item.horizontalScale < 0 ? -100 : 100;
        item.verticalScale = item.verticalScale < 0 ? -100 : 100;
        item.fit(FitOptions.PROPORTIONALLY);
      else if (item.hasOwnProperty("graphics")) {
        for (i = 0, l = item.graphics.length; i < l; i++) {
          graphic = item.graphics[i];
          graphic.horizontalScale = graphic.horizontalScale < 0 ? -100 : 100;
          graphic.verticalScale = graphic.verticalScale < 0 ? -100 : 100;
          graphic.fit(FitOptions.PROPORTIONALLY);
    function main() {
      var i, l;
      if (!app.documents.length) {
        return;
      for (i = 0, l = app.selection.length; i < l; i++) {
        fit(app.selection[i]);
    app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Really Fit Content Proportionally");
    There are  certainly some corner cases I've left out. Let me know if you try to use it and it doesn't work right.
    Jeff

Maybe you are looking for

  • How do I change my telstra bigpond cable login details on my airport extreme base station?

    I have reason to believe my password has been compromised so have changed my account details with my ISP but now I need to change the password on my home network. I have connected to the (n) airport extreme (which is connected to my cable modem) but

  • IPhone 5 sound on video is almost nonexistent

    The iPhone 5 takes great video, but the sound is almost not there at all.  Husband still has his iPhone 4 and the sound is fine.  Any thoughts?  I looked at settings and the sound is all the way up, and it isn't a problem hearing messages, etc. 

  • Any answer to the dreaded white screen?

    Besides "send it back to apple"? I'm a few months out of warranty. Everything works fine except the screen is bright white. I've searched but can't seem to find any solution other than send it back. Does anyone know what even causes this? Has anyone

  • Can I put an older OS (Leopard) on a new Mac Pro?

    We have an XSAN environment that is still using G5 servers and has some G5 workstations. One of the G5 workstations has just died and we need to replace it, however, the new computer will surely come with Snow Leopard on it which is not compatible wi

  • How long time to process an application?

    I have just submitted the application and label details in the iTunes Store. Approximately how long time will it take to process my application?