css - How to set iframe style from inner html -


i have following line of code

<iframe src="http://www.google.com" name="google" style="z-index: 0; margin-top: -1px; width: 100%; height: 1070px">     <html>          <head></head>          <body>              <div>some image here</div>          </body>     </html> </iframe> 

the problem iframe not visible in ie7. iframe visible if add style display: block;

i dont have access modify style top iframe can modify inner html.

how set style of top iframe html page ?

the iframe content subject same-domain policy. if it's domain, can control it, if not, you're locked out. prevents kinds of iframe-based page hijacking.

considering have direct access, following :

you need javascript. same doing in parent page, except must prefix javascript command name of iframe.

remember, same origin policy applies, can iframe coming own server.

i use prototype framework make easier:

frame1.$('mydiv').style.border='1px solid #000000' 

or

frame1.$('mydiv').addclassname('withborder') 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -