Table height 100% has no effect

Discussion in 'ASP .Net Web Controls' started by Ashish, Jun 8, 2005.

  1. Ashish

    Ashish Guest

    Hello All,
    I recently migrated to ASP.NET 2.0. I also migrated a toolbar control that I
    had made in ASP.NET 1.1. The toolbar table sets a height of 100% so the
    toolbar spans the whole page height incase of less buttons in a band.
    However I notice in ASP.NET 2.0 setting height to 100% has no effect. Can
    someone reason this out, as I scratch my head while doing the same :)
    Thanks,
    Ashish
    Ashish, Jun 8, 2005
    #1
    1. Advertising

  2. Ashish

    Ashish Guest

    For example the following page:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs"
    Inherits="Test" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <table style="height:100%;width:100%">
    <tr>
    <td bgcolor="red">
    <p>Hello</p>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    Displays the table in full 100% spanning width but not the height...
    Ashish

    "Ashish" <> wrote in message
    news:...
    > Hello All,
    > I recently migrated to ASP.NET 2.0. I also migrated a toolbar control that
    > I had made in ASP.NET 1.1. The toolbar table sets a height of 100% so the
    > toolbar spans the whole page height incase of less buttons in a band.
    > However I notice in ASP.NET 2.0 setting height to 100% has no effect. Can
    > someone reason this out, as I scratch my head while doing the same :)
    > Thanks,
    > Ashish
    >
    Ashish, Jun 9, 2005
    #2
    1. Advertising

  3. Ashish

    Guest

    Try doing <table height=100% instead of <table style=height:100%

    You should probably do that for width as well.

    Lisa


    Ashish wrote:
    > For example the following page:
    > <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs"
    > Inherits="Test" %>
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    >
    > <html xmlns="http://www.w3.org/1999/xhtml" >
    > <head runat="server">
    > <title>Untitled Page</title>
    > </head>
    > <body>
    > <form id="form1" runat="server">
    > <table style="height:100%;width:100%">
    > <tr>
    > <td bgcolor="red">
    > <p>Hello</p>
    > </td>
    > </tr>
    > </table>
    > </form>
    > </body>
    > </html>
    >
    > Displays the table in full 100% spanning width but not the height...
    > Ashish
    >
    > "Ashish" <> wrote in message
    > news:...
    > > Hello All,
    > > I recently migrated to ASP.NET 2.0. I also migrated a toolbar control that
    > > I had made in ASP.NET 1.1. The toolbar table sets a height of 100% so the
    > > toolbar spans the whole page height incase of less buttons in a band.
    > > However I notice in ASP.NET 2.0 setting height to 100% has no effect. Can
    > > someone reason this out, as I scratch my head while doing the same :)
    > > Thanks,
    > > Ashish
    > >
    , Jun 9, 2005
    #3
  4. Ashish

    Ashish Guest

    Hi Lisa,
    I have tried it and it doesnt work.
    Thanks tho.
    Ashish

    <> wrote in message
    news:...
    > Try doing <table height=100% instead of <table style=height:100%
    >
    > You should probably do that for width as well.
    >
    > Lisa
    >
    >
    > Ashish wrote:
    >> For example the following page:
    >> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs"
    >> Inherits="Test" %>
    >>
    >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    >> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    >>
    >> <html xmlns="http://www.w3.org/1999/xhtml" >
    >> <head runat="server">
    >> <title>Untitled Page</title>
    >> </head>
    >> <body>
    >> <form id="form1" runat="server">
    >> <table style="height:100%;width:100%">
    >> <tr>
    >> <td bgcolor="red">
    >> <p>Hello</p>
    >> </td>
    >> </tr>
    >> </table>
    >> </form>
    >> </body>
    >> </html>
    >>
    >> Displays the table in full 100% spanning width but not the height...
    >> Ashish
    >>
    >> "Ashish" <> wrote in message
    >> news:...
    >> > Hello All,
    >> > I recently migrated to ASP.NET 2.0. I also migrated a toolbar control
    >> > that
    >> > I had made in ASP.NET 1.1. The toolbar table sets a height of 100% so
    >> > the
    >> > toolbar spans the whole page height incase of less buttons in a band.
    >> > However I notice in ASP.NET 2.0 setting height to 100% has no effect.
    >> > Can
    >> > someone reason this out, as I scratch my head while doing the same :)
    >> > Thanks,
    >> > Ashish
    >> >

    >
    Ashish, Jun 9, 2005
    #4
  5. Ashish

    Guest

    Same problem, any luck? Maybe we can use JavaScript to keep the table
    at full height. I'm also trying to place other controls, mainly DIV
    tags to see if they well expand 100% height.

    Ashish wrote:
    > Hello All,
    > I recently migrated to ASP.NET 2.0. I also migrated a toolbar control that I
    > had made in ASP.NET 1.1. The toolbar table sets a height of 100% so the
    > toolbar spans the whole page height incase of less buttons in a band.
    > However I notice in ASP.NET 2.0 setting height to 100% has no effect. Can
    > someone reason this out, as I scratch my head while doing the same :)
    > Thanks,
    > Ashish
    , Jun 17, 2005
    #5
  6. Ashish

    Guest

    I took the generated HTML and started stripping stuff from it until the
    table expanded the page. The line below is causing the problem. I'm not
    sure what the purpose of it is but it seems to have something to do
    with conformance levels. Let me know if you have an explanation for
    this. Thanks.

    Mike

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    , Jun 17, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Not4u
    Replies:
    9
    Views:
    1,026
    Not4u
    Feb 27, 2004
  2. Paul Schmidinger

    table in table -> 100% height does not work

    Paul Schmidinger, Aug 10, 2004, in forum: HTML
    Replies:
    3
    Views:
    2,924
    roma1123
    Mar 24, 2011
  3. Replies:
    8
    Views:
    6,664
    Neredbojias
    Dec 9, 2005
  4. fred
    Replies:
    3
    Views:
    259
    Zifud
    Mar 17, 2005
  5. Replies:
    5
    Views:
    864
Loading...

Share This Page