positioning content inside iframe

Discussion in 'HTML' started by phl, Sep 18, 2007.

  1. phl

    phl Guest

    hello

    I have an iframe which loads an aspx page. This aspx page has a table.
    I would like the top left of the table to align with the top left of
    iframe. I have tried putting a div and using the left & top style
    properties to do this but my table in the aspx page jsut will not move
    at all. Does anyone know how I can do this?

    here's my iframe:
    <html>
    <head>
    </head>
    <body>
    <IFRAME align="center" width="500px" height="200px" id="VideoIFrame"
    src="test.aspx" scrolling="no" frameborder="1">
    </IFRAME>
    </body>
    </html>

    here's my aspx page:
    <%@ Page Language="C#" AutoEventWireup="true" %>

    <!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 runat="server">
    </head>
    <body>
    <form id="form1" runat="server">
    <div style=" left:50px">
    <table runat="server" width="500" border="5">
    <tr>
    <td>table</td>
    </tr>
    </table>
    </div>
    </form>


    </body>
    </html>
    phl, Sep 18, 2007
    #1
    1. Advertising

  2. phl

    Ivanovich Guest

    Put this code in between your head tag or in a css file in the aspx
    page.

    By default the body can have some margin or padding.

    <style>

    body {
    margin: 0px;
    padding: 0px;
    }

    </style>

    On Sep 18, 2:11 am, phl <> wrote:
    > hello
    >
    > I have an iframe which loads an aspx page. This aspx page has a table.
    > I would like the top left of the table to align with the top left of
    > iframe. I have tried putting a div and using the left & top style
    > properties to do this but my table in the aspx page jsut will not move
    > at all. Does anyone know how I can do this?
    >
    > here's my iframe:
    > <html>
    > <head>
    > </head>
    > <body>
    > <IFRAME align="center" width="500px" height="200px" id="VideoIFrame"
    > src="test.aspx" scrolling="no" frameborder="1">
    > </IFRAME>
    > </body>
    > </html>
    >
    > here's my aspx page:
    > <%@ Page Language="C#" AutoEventWireup="true" %>
    >
    > <!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 runat="server">
    > </head>
    > <body>
    > <form id="form1" runat="server">
    > <div style=" left:50px">
    > <table runat="server" width="500" border="5">
    > <tr>
    > <td>table</td>
    > </tr>
    > </table>
    > </div>
    > </form>
    >
    > </body>
    > </html>
    Ivanovich, Sep 20, 2007
    #2
    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. Daedalous
    Replies:
    3
    Views:
    687
    Daedalous
    Jan 16, 2004
  2. nc
    Replies:
    0
    Views:
    144
  3. Nathan Carr
    Replies:
    0
    Views:
    267
    Nathan Carr
    Sep 17, 2004
  4. Joe Attardi
    Replies:
    0
    Views:
    505
    Joe Attardi
    Jan 17, 2006
  5. Replies:
    0
    Views:
    121
Loading...

Share This Page