jquery - How to center an iframe that is created via injection -


I am trying to create a bookmark that creates an iframe on the page that you are on if you click on it I can find IFrame to show, but I am unable to focus it on the page.

Here is the code:

  javascript: (function (e, a, g, h, f, c, b, d) {if >> g> (F = e.jQuery!); F.fn.jquery || h (f)) {c = a.createElement ("script"); c.type = "text / javascript"; c.src = "http: //ajax.googleapis.com/ajax/libs/jquery/ "+ g +" /jquery.min.js "; c.onload = c.onreadystatechange = function () {if (B & amp;! (D = this.readyState) || d == "load" || d == "complete") {hour ((= e.jQuery f) .noConflict (1), b = 1); f (c) ) .remove ();}}; a.documentElement.childNodes [0] .appendChild (c);}}) (window, document, "1.5.1", function ($, L) {var a = $ (' & Lt; iframe / & gt; ', {id:' test-iframe ', category:' test-iframe ', genre:' position: full; z-index: 99999; ', width:' 700 ', height : '500', src: 'h Ttp: //google.com '}); $ (' body '). Prepaid (A);});   

Any help is appreciated.

add margin: 0 auto; In style

You can also create IFrame in the container (such as DIV), in which you have the margin: 0 auto; From . .

Comments