Forum Moderators: open
The .contents() method can also be used to get the content document of an iframe, if the iframe is on the same domain as the main page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>hiding iframe content</title>
<style type="text/css">
body {
margin:0;
}
/* for Firefox and Wewbkit */
#iframe-container {
background:-moz-linear-gradient(top,#fff 55%,#eee);
background:-webkit-gradient(linear,left top,left bottom,color-stop(55%,#fff),to(#eee));
}
#inner {
height:136px;
width:800px;
margin:auto;
overflow:hidden;
}
#strava {
display:block;
width:804px;
height:160px;
border:0;
margin:-2px 0 0 -2px;
}
#strava-link {
width:800px;
margin:auto;
overflow:hidden;
}
#strava-link a {
float:right;
line-height:22px;
padding:0 10px;
border-radius:0 0 5px 5px;
background-color:#f26522;
font-size:10px;
color:#fff;
text-decoration:none;
}
#strava-link a:hover {
text-decoration:underline;
}
</style>
<div id="iframe-container">
<div id="inner">
<iframe id="strava"
scrolling="no"
src="http://app.strava.com/clubs/shift/latest-rides/7fc3de7b9d74afbba847b1b19b8487b7471acd68?show_rides=false">
</iframe>
</div>
</div>
<div id="strava-link">
<a href="http://www.strava.com/clubs/shift?&utm_medium=widget&utm_campaign=club_share&utm_content=16518">
View all of SHIFT's activity on Strava »
</a>
</div>
</body>
</html>