Full Page <iframe> -
i have example code below. works fine browsers except browsers on mobile devices.
the overflow tag issue
works except mobile
margin: 0; padding: 0; height: 100%; overflow: hidden;
works mobile , not computers
margin: 0; padding: 0; height: 100%;
what's best way work on both?
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test layout</title> <style type="text/css"> body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; } </style> </head> <body> <iframe width="100%" height="100%" src="http://www.cnn.com" /> </body> </html>
here's working code. works in desktop , mobile browsers. hope helps. responding.
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>test layout</title> <style type="text/css"> body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; } #content { position:absolute; left: 0; right: 0; bottom: 0; top: 0px; } </style> </head> <body> <div id="content"> <iframe width="100%" height="100%" frameborder="0" src="http://cnn.com" /> </div> </body> </html>
Comments
Post a Comment