fixed position not working in iframe properly
Ive got an iframe which loads up a page. on that page ive got a <div> which i want to format to fill the entire screen. The iframe does not fill the screen though. From what i read position:fixed; for css is supposed to fix the position to the browser window and not to the container it is in like position:absolute; would. however even though ive got...
the div only fills the iframe not the whole browser window
Not sure if it works, but is an ideea .
no its the same thing. it seems it doesnt want to respect the browser window and only wants to respect the iframe window
Post a link to the page. The css for only one element is just part of the story.
Is the iframe inside mydiv? and you want mydiv in a fixed position 0,0 top left? and you want mydiv to will entire window? ... but iframe contents may not be large enough to so that.
Anyway, post a link and describe again what you are attempting, then we will be better able to visualize and assist.
Eye for Video
If #myDiv resides in the document that is displayed by your <iframe> tag, then it's position will be calculated in reference to the <iframe> (or, more precisely, the document displayed in the <iframe>), not the parent document. So position the <iframe> tag itself.
rtrethewey has it right. the DIV is in the document thats opened inside the iframe. i thought absolute positioning was supposed to be relative to the container and fixed was to the browser.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)