Editor height with doctype XHTML 1.0 Transitional

Last post 07-25-2007, 4:43 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  05-24-2007, 12:16 AM 30028

    Editor height with doctype XHTML 1.0 Transitional

    I would like the editor to fill the browser window except for a navigation bar at the top and a sidebar at the left. If I create a new page (VS 2005) and set the editor up as follows (as a test with no header and sidebar), the editors height renders at about 280px. 

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
    <%
    @ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <
    head id="Head1" runat="server"></head>
    <
    body>
       <form id="form1" runat="server">
          <div>
             <CE:Editor id="Editor1" runat="server" Height="100%" ></CE:Editor>
          </div>
       </form>
    </
    body>
    </
    html>
     
    If I remove the DOCTYPE it resizes to a height of 100%. I am using the editor in a master page out of my control where I cannot remove the doctype nor do I want to. How do I make the editor fill the browser? I have looked at runtimeStyle using script but can't get it to work.
  •  05-24-2007, 2:47 PM 30062 in reply to 30028

    Re: Editor height with doctype XHTML 1.0 Transitional

    icon,
     
    Try set Editor.FullPage Property property to true.
     
    Or change:
     
          <div>
             <CE:Editor id="Editor1" runat="server" Height="100%" ></CE:Editor>
          </div>

    to:

          <div style="height:500px">
             <CE:Editor id="Editor1" runat="server" Height="100%" ></CE:Editor>
          </div>

    When you use

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    and height 100%, the parent node of the current element must have a value.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-24-2007, 6:09 PM 30079 in reply to 30062

    Re: Editor height with doctype XHTML 1.0 Transitional

    Adam,
     
    Editor.FullPage is close to what I want but my example was simplified to make it easily readable. My real page has a header div and a sidebar as mentioned in the original post. Using Fullpage mode covers these up.
     
    If I set the parent div to 500px then resize the div with script using document.documentElement.clientHeight-100 or similar the editor has problems when switching to html mode (edit area is tiny, toolbar and footer fills the screen), and also if the user makes the browser narrower causing toolbars to wrap it cuts the bottom off.
     
    In simplified form I want: editor.fullpage - 100 pixels for a header. The sidebar is not important as 100% width works fine. So my code is:

    <
    div style="height: 100px" id="header">
    Header will go here</div>
    <div style="height:500px">
             <CE:Editor id="Editor1" runat="server" Height="100%"></CE:Editor>
          </div>
     
    Thanks
  •  07-25-2007, 4:43 PM 31887 in reply to 30079

    Re: Editor height with doctype XHTML 1.0 Transitional

View as RSS news feed in XML