Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > iframe oddity?

Reply
Thread Tools

iframe oddity?

 
 
richard
Guest
Posts: n/a
 
      06-04-2013
Two iframes side by side.
One has a height of 500px and the other 800px.
Why is their a 300 px gap at the top of one?
Shouldn't the iframe base its starting point at the top?
If not, how to correct it?

www.mroldies.net
 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      06-04-2013
On Tue, 4 Jun 2013 16:50:01 -0400, richard wrote:

> Two iframes side by side.
> One has a height of 500px and the other 800px.
> Why is their a 300 px gap at the top of one?
> Shouldn't the iframe base its starting point at the top?
> If not, how to correct it?
>
> www.mroldies.net


btw, when they are of the same height, there is no gap.
also, how do you properly style an iframe so the height and width adjust
according to content? overflow:hidden doesn't seem to work.
 
Reply With Quote
 
 
 
 
Denis McMahon
Guest
Posts: n/a
 
      06-04-2013
On Tue, 04 Jun 2013 17:19:52 -0400, richard wrote:

> On Tue, 4 Jun 2013 16:50:01 -0400, richard wrote:
>
>> Two iframes side by side.
>> One has a height of 500px and the other 800px.
>> Why is their a 300 px gap at the top of one?
>> Shouldn't the iframe base its starting point at the top?
>> If not, how to correct it?


Put the iframes in divs and position the divs how you want them, or
position the iframes more accurately to start with.

> btw, when they are of the same height, there is no gap.
> also, how do you properly style an iframe so the height and width adjust
> according to content? overflow:hidden doesn't seem to work.


If the parent and content are from the same site, they can talk to each
other, in which case you could try and send a request from the content to
the parent and the parent could try and dynamically resize the iframe.

If the parent and content are not from the same site, XSS security will
usually prevent that working, or indeed any communication between the
iframe content and the parent.

--
Denis McMahon, http://www.velocityreviews.com/forums/(E-Mail Removed)
 
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
form have 2 iframe.problem to input text in other iframe elca Python 0 10-21-2009 10:00 AM
how to use an iframe as a link (make the whole iframe clickable) mi HTML 4 05-21-2008 10:13 PM
Targeting a parent iframe from a sub-iframe albanitus@yahoo.com HTML 0 11-15-2006 04:40 PM
IFRAME - Refresh Table on Parent Window - maintain IFRAME State Scott ASP General 6 04-14-2004 05:48 AM
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