|
|
|
|
![]() ![]() |
May 21 2005, 11:06 AM
Post
#11
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 21-May 05 Member No.: 7,330 |
QUOTE(Amezis @ Apr 6 2005, 06:47 PM) 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: CODE ....
<script> function trimSize() { var ff = document.body.scrollWidth; document.body.style.width = ff+"px"; } </script> </head> <body onLoad="trimSize();"> .... |
|
|
|
Mar 13 2008, 02:29 AM
Post
#12
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
about the removal of the horizontal scrolling-bar in iFrames
Disabling Horizontal Scroller In Iframe? I've also had the same pb with the horizontal scrolling-bar ... I've tried resizing the framed page with <b>{width:95%}</b>, tried with <b>overflow-x:hidden</b>, tried deleting the DTD lines at the top of the page ... None of them worked ! Here's the answer [I found it somewhere on the net, looking stupid, but it works] ... For scrolling in the iFrame I've set value "yes" (<b>scrolling="yes"</b>), so I got rid of the horizonal bar. Then I checked the site in Mozilla and it appeared here (previously it was allright in Mozilla), so I've added <b>style="overflow-x:hidden;"</b> ... So it worked with Mozilla also. Here's the complete lines: <IFRAME name=stbbox src="serv_frame.Html" width="365" height="300" scrolling="yes" style="overflow-x:hidden;" frameborder="0" marginheight="0" marginwidth="0" vspace="0" hspace="0"> <p>Your browser doesn't support frames. Click <a href="serv_frame.Html" target="_blank">here</a> to view the page.</p> </IFRAME> Hope you enjoy it as I do !! -reply by Calin |
|
|
|
Apr 2 2008, 04:18 PM
Post
#13
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
Replying to Trap FeedBacker
You can use horizontalscrolling="no/yes" and verticalscrolling="no/yes" An example of this will be on lornamacdonald.Co.Uk shortly, as an image preview scrollbar. Here is the entire thread of code I have used: <iframe width="600px" height="100" id="iframe_id" name="iframe_name" src="commercial.Htm" horizontalscrolling="yes" verticalscrolling="no" marginwidth="0" marginheight="0" frameborder="0" ALLOWTRANSPARENCY="true" onload=resize_iframe();></iframe> If you are using iframes, search for iframe resize on google for a nifty little javascript code that I use at the end.. |
|
|
|
Jun 17 2008, 11:54 AM
Post
#14
|
|
|
Trap Double Mocha Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,360 Joined: 21-September 07 Member No.: 50,369 |
Hide Horizontal scroll bar of IFRAME.
Disabling Horizontal Scroller In Iframe? How to hide horizontal scroll bar using IFRAME control. I want only vertical scroll bar. If description width is long then appear horizontal scroll bar but I not want horizotal scroll bar any way. Help me. -reply by piyush |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 26th July 2008 - 04:03 PM |