Iframe not centered

Hi all
i want my iframe centered in the middle of my tab. see picture

can you help me out here ??

[{"id":"38aa91ac.81b13e","type":"function","z":"85c6adaf.bd9f5","name":"buienradar","func":"d = new Date().getTime()\n\no = \"<iframe src='https://gadgets.buienradar.nl/gadget/zoommap/?lat=52.26417&lng=4.63056&overname=2&zoom=6&naam=nieuw-vennep&size=2&voor=1' scrolling=no width=256 height=256 frameborder=no></iframe>\"\n\nreturn {template:o};","outputs":1,"noerr":0,"x":790,"y":1360,"wires":[["356499db.6e1596"]]},{"id":"356499db.6e1596","type":"ui_template","z":"85c6adaf.bd9f5","group":"973002a6.a4d9f","name":"","order":1,"width":6,"height":6,"format":"<center><div ng-bind-html=\"msg.payload\"></div></center>\n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1420,"y":1360,"wires":[[]]},{"id":"973002a6.a4d9f","type":"ui_group","z":"","name":"BuienRadar","tab":"70669a12.a74c34","order":10,"disp":true,"width":"6","collapse":false},{"id":"70669a12.a74c34","type":"ui_tab","z":"","name":"info","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

many thanks in advance

Did you try adding a 'style' to the iframe statement to set a margin?

yes but that did fix it .
i hope someone can help me with this


Your response is confusing. Did that fix the issue or not. If not, exactly what did you add?

If it did fix it, please mark this solved.

I think surrounding the iframe tag in the function node by <div align=\"center\">and </div>
will do the job like it is done here:

o = "<div align=\"center\"><iframe src='https://gadg...></iframe></div>"

YESS!!!!! thats fixed it !!! many many thanx
i forgot ( i think ) the " in front of it

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.