Skip to content

Instantly share code, notes, and snippets.

@braddown
Created July 15, 2012 06:11
Show Gist options
  • Save braddown/3115307 to your computer and use it in GitHub Desktop.
Save braddown/3115307 to your computer and use it in GitHub Desktop.
Full Screen Mobile Image
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Burst SMS Coupon</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<script type="text/javascript">
// When ready...
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
});
</script>
<style>
html,body {margin: 0 auto; padding: 0; text-align:center;}
#container{
width: 100%;
margin: 0 auto;
}
img {
width:100%;
height: auto;
max-width: 100%;
}
/* phone */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
img { max-width: 100%; }
}
/* tablet */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
img { max-width: 100%; }
}
</style>
</head>
<body>
<div id="container">
<a href="mailto:coupon@burstsms.com?subject=MMWS1250"><img src="http://known.com.au/burstcoupon/burst50coupon.jpg"></a>
</div> <!-- end of container div -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment