Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > positioning content inside iframe

Reply
Thread Tools

positioning content inside iframe

 
 
phl
Guest
Posts: n/a
 
      09-18-2007
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>

 
Reply With Quote
 
 
 
 
Ivanovich
Guest
Posts: n/a
 
      09-20-2007
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 <(E-Mail Removed)> 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>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with iframe inside another iframe (with designMode="on") sammyleong@gmail.com Javascript 0 01-19-2006 12:28 AM
Div inside an iframe - how to set height relative to the iframe's visible size? Joe Attardi Javascript 0 01-17-2006 08:01 PM
Need to get offsetLeft of an iframe or div inside another iframe Nathan Carr Javascript 0 09-17-2004 01:27 PM
How To pop content into bottom IFrame from top IFrame nc Javascript 0 08-10-2004 01:19 PM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM



Advertisments