Contained within a parent div with overflow hidden is a Facebook-comments widget that is vertically cut off. This setup allows for showing only a portion of the content initially and expanding the parent container using jQuery.
While this method works well on most major browsers (including Safari for iPhone), it presents an issue on Android (tested on version 4.0, browser version unknown). In Android, even though the content outside the overflowed div remains invisible, it is still accessible. Users can click on links they cannot see, which is not the desired behavior.
The HTML structure is:
<div class="pageBlock column5050 column2">
<div style="" class="ext_container">
<div data-mobile="false" data-width="" data-num-posts="10" data-href="http://na.se/redesign2012/kundcenter" class="fb-comments fb_iframe_widget">
<span style="height: 1049px; width: 550px;">
<iframe scrolling="no" id="fcb3ba7898c46" name="f169222f1ff27fe" style="border: medium none; overflow: hidden; height: 1049px; width: 550px;" class="fb_ltr " src="https://www.facebook.com/plugins/comments.php?api_key=113851685335230&channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D8%23cb%3Df12db7f9bc71f98%26origin%3Dhttp%253A%252F%252Fna.se%252Ffb9561675e1892%26domain%3Dna.se%26relation%3Dparent.parent&href=http%3A%2F%2Fna.se%2Fredesign2012%2Fkundcenter&locale=sv_SE&mobile=false&numposts=10&sdk=joey&width=550"></iframe>
</span>
</div>
</div>
<div class="fb_expand_btn expand_btn">
<span class="expand_capt">Show more...</span>
</div>
<script type="text/javascript">
[...]js/jQuery to expand/contract "ext_container"[..]
</script>
</div>
All content inside "ext_container" is generated by the Facebook comments widget over which I have limited control due to using a third-party CMS.
The CSS being used includes:
.fb-comments {
width: 100% !important;
}
.fb-comments span, .fb-comments iframe {
width: 100% !important;
}
.ext_container {
position: relative;
height: 440px;
overflow: hidden;
margin: 0 20px 20px;
}
.fb_expand_btn.expand_btn {
margin: 0 20px;
}
The script only adjusts the height of ext_container.
I set ext_container to position:relative to address an IE7 bug where overflow:hidden was ignored.
The 100% width settings are designed for a fully fluid layout.
If anyone has encountered this issue before and found a solution, I would greatly appreciate any help or advice.