why height="100%" doesn't work?

Last post 11-20-2009, 10:57 AM by Adam. 4 replies.
Sort Posts: Previous Next
  •  11-19-2009, 7:09 PM 57305

    why height="100%" doesn't work?

    hi there, I'm wirting a very simple page which has a tool bar on the top and followed by the cute editor. I want the cute editor always fits in the rest of the web page.  So I set Height="100%", however it never works. I'm using vs 2008.
    it must be a very common issue.
    Can someone help? thx

    <CE:Editor ID="Editor1" runat="server"

    ShowCodeViewToolBar="False"

     

    ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/AutoConfigure/MyTool.config"

    Height="100%" Width="100%"

    ShowPreviewMode="False" ResizeMode="None">

    </CE:Editor>

  •  11-19-2009, 7:11 PM 57306 in reply to 57305

    Re: why height="100%" doesn't work?

    attached is the screen shot.
     
  •  11-19-2009, 7:46 PM 57308 in reply to 57306

    Re: why height="100%" doesn't work?

    Hi wolf11th,
     
    Try this way:
    1. <%@ Page Language="C#" AutoEventWireup="True" %>   
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
    5.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    6. <html xmlns="http://www.w3.org/1999/xhtml">   
    7. <head id="Head1" runat="server">   
    8. </head>   
    9. <body >   
    10.     <form id="Form1" runat="server">   
    11.         <CE:Editor ID="Editor1" runat="server" Width="100%">   
    12.         </CE:Editor>   
    13.     </form>   
    14. </body>   
    15. </html>   
    16. <script type="text/javascript">   
    17. var editor1=document.getElementById('<%= Editor1.ClientID %>');   
    18. function CuteEditor_OnInitialized(editor)   
    19. {   
    20.  editor1.SetHeight(document.documentElement.clientHeight-40);    
    21. }   
    22. window.onresize=function()   
    23. {   
    24. editor1.SetHeight(document.documentElement.clientHeight-40);    
    25. }   
    26.   
    27. </script>  
    Regards,
     
    Ken
  •  11-19-2009, 8:23 PM 57310 in reply to 57308

    Re: why height="100%" doesn't work?

    that works
     
    thx Ken very much~~~
  •  11-20-2009, 10:57 AM 57324 in reply to 57310

    Re: why height="100%" doesn't work?

    wolf11th:
    that works
     
    thx Ken very much~~~
     
    Please try the following code as well:
     
    1. <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>  
    2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  
    3. <html>  
    4.     <head>  
    5.     <style>  
    6.     html, body, form{ height: 100%;}   
    7.     </style>  
    8.     </head>  
    9.     <body>  
    10.         <form runat="server">  
    11.         <CE:Editor id="Editor1" Height="100%"  runat="server" ></CE:Editor>            
    12.         </form>  
    13.     </body>  
    14. </html>  

    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

View as RSS news feed in XML