|
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?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
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=6361Please see the last message posted by us for more details. Thanks!
|
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Excellent. Thanks for sharing!
|
|