March 6, 2012

Absolute position elements within iframe?

Question by Uzair Farooq

I want to absolute position an element in iframe relative to the document. I’m using this

.myClass
{
    position: absolute;
    top: 0;
    left: 0;
}

but it do not position the element at top left of document, it’s positioned at top left of the iframe.
How to apsolute position it to the document? jquery/javascript solutions are acceptable

Answer by Starx

Basically, in an iframe you load a different website or webpage.

The scripts, elements and CSS have to be controlled from within that page.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!