Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6022799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:54:38+00:00 2026-05-23T03:54:38+00:00

I have an iFrame which has it’s source set to another aspx page. The

  • 0

I have an iFrame which has it’s source set to another aspx page.

The child aspx page is simple, it just has a table with two rows and two columns (two labels and two controls inside the table).

Problem is centering. The iFrame’s height is 425 px. The table (in the child aspx page) is not that tall. It centers horizontally alright, the problem is getting it to center vertically. Here’s a cheesy graphical representation:

Transform this

iFrame
---------------
|    ----     |
|    |Tb|     |
|    ----     |
|             |
|             |
---------------

Into this:

iFrame
---------------
|             |
|    ----     |
|    |Tb|     |
|    ----     |
|             |
---------------

And, of course, my existing code:

<table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0>
<tr><td width="100%" height="100%" valign="middle">
<table style="margin:0 auto" cellpadding=0 cellspacing=0>
    <tr>
        <td class="style2">
            Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
        <td class="style3">
    <asp:TextBox ID="txtDate" runat="server"></asp:TextBox><asp:CalendarExtender CssClass="cal_Theme1" ID="CalendarExtender1"
        runat="server" PopupButtonID="txtDate" TargetControlID="txtDate">
    </asp:CalendarExtender>
        </td>
    </tr>
    <tr>
        <td class="style2">
            &nbsp;</td>
        <td class="style3">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style2">
    Reasons:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
        <td class="style3">
    <asp:ListBox ID="txtReasons" runat="server" Width="266px" 
        SelectionMode="Multiple"></asp:ListBox>
        </td>
    </tr>
    <tr>
        <td class="style2">
            &nbsp;</td>
        <td class="style3"><div align=right><br />
            <asp:LinkButton ID="GetPolicy" runat="server" BackColor="#20548E" 
                 BorderColor="#20548E" BorderStyle="Solid" Font-Names="Tahoma" Font-Size="Small" 
                 Font-Underline="False" ForeColor="White" Height="16px" Width="85px">          <center>
                 Send To Batch</center></asp:LinkButton></div></td>
    </tr>
</table>
</td></tr></table>

Any ideas?

Thanks,

Jason

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:54:39+00:00Added an answer on May 23, 2026 at 3:54 am

    You can set the size of your iFrame to small enough to fit your child page. Then align the iFrame whereever you want on the page. This way it’ll be simple.

    If you want your child page to disply it’s table in the vertical centre, it should be the table all alone. It should be placed inside another container, may be in another table’s td.

    Use the style property of outter table to fill the complete page.
    Set the style of your table to come to the centre of the screen.

    Try this code.

    <html>
    <body>
        <table width="100%" height="100%">
            <tr>
                <td align="center" valign="middle">
                    <table align="center">
                        <tr>
                            <td valign="middle">
                                1,1</td>
                        </tr>
                        <tr>
                            <td>
                                1,2</td>
                        </tr>
                        <tr>
                            <td>
                                2,1</td>
                        </tr>
                        <tr>
                            <td>
                                2,2</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which has an Iframe. In that Iframe, there are six
I have a classic asp page which has, encapsulated within it in an iframe,
I have a page (index.html) which has a frame: <html> <body> <iframe src=otherPage.html />
Actually i have iframe which has some important content in it ,but problem is
Is it legal to have an IFrame on a website which inside has an
I have a table which has a header row and few rows for the
I have iframe in the site which acts as an internal browser. I know
i have an iframe on my page and seem to be facing somewhat common
I have created an iframe code that I want people to use as a
I am working with an asp.net 2.0 site (call it site 1) which has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.