Welcome Guest Search | Active Topics | Sign In | Register

Editor Height Wonky Options
Arnold Bailey
Posted: Friday, September 19, 2008 11:44:56 AM
Rank: Advanced Member
Groups: Member

Joined: 8/4/2007
Posts: 42
In your Autosize demo you mention that Editor.Height is supported and that the preferred method is place it in another component which I assume would be a <div>

What I would like to do is have an editor that would readjust to the browser window size in both width and height. So I did this.

<div style="height:95%;width:95%;">
<eo:Editor ID="Editor1" runat="server" Height="100%" Width="100%"></eo:Editor>
</div>

If I run this the editor displays with the Footer above the Header and no edit area at all. If I remove the Height="100%" from the Editor then it sits at the default height period. If I use px on the div it works correctly but that's not self resizing. I suppose I could write some JavaScript to resize dynamically based on px but that's not auto. Is this as you intended?
eo_support
Posted: Friday, September 19, 2008 12:56:32 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,092
Hi,

What you perceived is normal. :) The issue has to do with how percentage height is interpreted. A common misconception is that percentage height is based on the height of the window. This is wrong --- it is based on the height of the form, which by default has zero height. This has also been discussed in the following thread:

http://www.essentialobjects.com/Forum/Default.aspx?g=posts&m=6361

Please see the last message posted by us for more details.

Thanks!

Arnold Bailey
Posted: Friday, September 19, 2008 2:32:39 PM
Rank: Advanced Member
Groups: Member

Joined: 8/4/2007
Posts: 42
Ahh. Form.style.height was the right hint. Not quite the whole story. In IE all the objects containing the form need to be set for 100% as well, so you need a page style like

Code: CSS
<style type="text/css">
      html,body{height:100%;width:100%;margin:0}
      form {height:100%;width:100%;}
    


Now the editor will fill the screen and resize correctly as you resize the browser. Nice.
eo_support
Posted: Friday, September 19, 2008 2:35:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,092
Excellent. Thanks for sharing!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.