Jump to content
xisto Community

weblin

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hi, Amezis!I recently found a little trick that can help to hide only horizontal scrollbar in iframe. First I tried to kill this scrollbar width css overfow-x feature etc. but no success - there always was a little lag in iframe document width at least at scrollbar width. I supposed that IE just set document width to iframe clientWidth (but for some reason IE returns full iframe width INCLUDING scrollbars). Then I set to body tag in iframe src document style="width:NNNpx" (where NNN < iframe width on scrollbar width). And voila! But it can be made more universal by attaching simple javascript function to onload event in src document. It seems that IE needs just to get scrollWidth value of iframe doc just once(!) and everything will be fixed. Magic... Smtng like: ....<script>function trimSize() { var ff = document.body.scrollWidth; document.body.style.width = ff+"px";}</script></head><body onLoad="trimSize();">....
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.