Jul 6, 2008

Disabling Horizontal Scroller In Iframe? - How can I do that?

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..
Pages: 1, 2

free web hosting

Disabling Horizontal Scroller In Iframe? - How can I do that?

weblin
QUOTE(Amezis @ Apr 6 2005, 06:47 PM)
Is there a way to disable the horizontal scroller in iframes? If yes, how can I do it?
*



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... smile.gif
Smtng like:

CODE
....
<script>
function trimSize() {
var ff = document.body.scrollWidth;
document.body.style.width = ff+"px";
}
</script>
</head>

<body onLoad="trimSize();">
....

 

 

 


Reply

iGuest
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

 

 

 


Reply

iGuest
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..


Reply

iGuest
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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. iframe no scrollbar - 1.11 hr back.
  2. hiding horizontal iframe scrollbars - 3.84 hr back.
  3. disable horizontal scroll - 9.96 hr back.
  4. iframe no horizontal scrolling - 10.90 hr back.
  5. iframe no overflow-x - 13.04 hr back.
  6. remove scroll bar from inline frame - 13.37 hr back.
  7. hide horizontal scroll bar iframe - 14.15 hr back.
Similar Topics

Keywords : disabling, horizontal, scroller, iframe

  1. Iframe Src = A Local File In My Computer
    (6)
  2. Iframe Menu Question
    (1)
    I am trying to make a menu for my site. I made an HTML page with the text/links of the menu, then I
    embedded that page in all the main "content" pages using an iframe. The problem is that whenever I
    click the links in the menu they open INSIDE of the iframe instead of switching the whole browser to
    the page the link is directed to. I hope I'm not TOO hard to understand. /wink.gif"
    style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Oh, and on this page it has
    the perfect example of what I want. http://www.w3schools.com/tags/tag_iframe.asp See ....
  3. Help With Css/html Layout
    Horizontal List Problems (5)
    I can't figure out why this horizontal list isnt working. Underneath my banner is supposed to
    be a green gradient bar with a list of links in the center of the page. The links are all the way
    to the left and are really small. The banner is also overlapping the list for some reason. This is
    my current layout(don't worry, I'm not trying to advertise).
    http://www.stormgaming.net/stormcreations/ This is my CSS file
    http://www.stormgaming.net/stormcreations/storm.css Thanks in advance for any help.....
  4. Change Scroller Icon (like Favicon)
    How do I change the scroller? (3)
    I was reading about browser specific hacks, to hide something from IE, and I found this nice article
    in the Sitepoint website. As I was reading it, I clicked the middle mouse button (scroller) and
    instead of the ugly circle with two arrows and a dot in the middle a personalized Icon (of
    sitepoints logo) appeared. Its kind of like the favicon thing, but with the scroller instead. Anyone
    here knows how to do this? Or what its called? (scrollicon?, lol, dont know).....
  5. Website Security
    encryption/html function disabling etc. (2)
    Hey Guys, Searched for posts re: webpage security (keeping slimeB*lls from "borrowing" your content)
    on the forums & came up blank. So thought I'd start a string here. OK, so does anyone have any
    info to contribute? Has anyone used html encryption programs? Does this create problems with
    browsers "reading" the page content or other functionality problems? What about webpage/html
    modifications/"updates" after the page has been encrypted? How good is the encryption OR how easy is
    it to hack/crack etc. ??? Anybody? Cheers! PS-Any strings/links in the forums I've....

    1. Looking for disabling, horizontal, scroller, iframe

Searching Video's for disabling, horizontal, scroller, iframe
advertisement



Disabling Horizontal Scroller In Iframe? - How can I do that?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE