Ekrem
Kategori:Çalışma Notları
| Tarih:
23.11.2012 23:50:54
Bu yazı 561 defa okundu
Iframe üzerine
Kaynak kodları paylaşmama isteğimden ötürü bugün uyguladığım bir metot.
İnternette arattığınızda da bulabilirsiniz kendim çalıştırdığım kodu aynen paylaşmak istiyorum.
Iframe kullanırken kendi etiketi içersine width=100% ve height=100% yazmanız; görüntüleyeceğiniz sayfayı tam sayfa olarak göstermiyor. Bunun çözümünü CSS kullanarak çözmüşler. İhtiyacınız olursa kullandığım kodu aynen yazıyorum. Meraklılarına ve ilgililerine ;) Çalışmalarınızda başarılar dilerim.
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="author" content="Ekrem GÜLCÜOĞLU" />
<title>SAYFA BAŞLIĞINIZ</title>
<style type="text/css" media="screen">
html, body {
position: absolute;
height: 100%;
max-height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
iframe {
position: absolute;
height: 100%;
width: 100%;
border: none;
}
#container {
position: absolute;
top: 0px;
bottom: 0;
width: 100%;
overflow: hidden ;
}
#header {
position: absolute;
top: 0px;
height: 50px;
color: #eee;
background-color: #ccc;
width: 100%;
}
</style>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2701478-25']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="header"></div>
<div id="container">
<iframe src="http://WWW.GÖSTERİLECEK SAYFA.XXX"></iframe>
</div>
</body>
</html>