Scrolling in an iFrame

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
User avatar
alex4orly
 
 
Posts: 670
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Scrolling in an iFrame

Post by alex4orly » Sat Jan 06, 2018 12:17 am

I have a page with 2 iFrames in it,
I want one of those to have the ability to scroll VERTICAL only, if required - but WB allows me for all or none...

I have inserted manually (after publishing the page) the following 2 lines into the page

overflow-y: scroll;
overflow-x: hidden;

BUT, the horizontal / Y axis scroll bar shows up...

Also, I have several segments of the iFrame repeated in the page, why? - below are the segments

#InlineFrame1
{
border: 1px #C0C0C0 solid;
}
#InlineFrame1
{
display: block;
float: left;
width: 100%;
height: 559px;
vertical-align: top;
overflow-y: scroll;
overflow-x: hidden;
}
....
#InlineFrame1
{
}
...
#InlineFrame1
{
height: 270px;
visibility: visible;
display: block;
color: #FFFFFF;
font-size: 8px;
font-family: Arial;
font-weight: normal;
font-style: normal;
text-decoration: none;
background-color: transparent;
background-image: none;
overflow-y: scroll;
overflow-x: hidden;
}
...
#InlineFrame1
{
height: 241px;
visibility: visible;
display: block;
color: #FFFFFF;
font-size: 8px;
font-family: Arial;
font-weight: normal;
font-style: normal;
text-decoration: none;
background-color: transparent;
background-image: none;
overflow-y: scroll;
overflow-x: hidden;
}
...

User avatar
Pablo
 
Posts: 17609
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Scrolling in an iFrame

Post by Pablo » Sat Jan 06, 2018 8:00 am

To enable/disable scrollbars of an inline frame you will need to modify the properties of the page that is displayed inside the frame.

User avatar
alex4orly
 
 
Posts: 670
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Scrolling in an iFrame

Post by alex4orly » Sat Jan 06, 2018 8:26 am

Can you please give me a hint / example?
Thanks

User avatar
Pablo
 
Posts: 17609
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Scrolling in an iFrame

Post by Pablo » Sat Jan 06, 2018 8:42 am

I'm sorry I do not have the exact code.
But I think you will need to modify the style of the body (or html) of the page inside the frame.

Code: Select all

body, html
{
overflow-y: scroll;
overflow-x: hidden;
}

User avatar
alex4orly
 
 
Posts: 670
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Scrolling in an iFrame

Post by alex4orly » Sat Jan 06, 2018 10:29 am

Do you mean
The page with the iframe,
Or the other page i am loading into the iframe?
???

User avatar
Pablo
 
Posts: 17609
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Scrolling in an iFrame

Post by Pablo » Sat Jan 06, 2018 10:57 am

Do you mean "The page with the iframe"
No, the page within the iframe.

User avatar
alex4orly
 
 
Posts: 670
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Scrolling in an iFrame

Post by alex4orly » Sat Jan 06, 2018 9:18 pm

The control of scrollbars in the iframe must be done in the same page the iframe object is in.

I don't get any result when i try doing it in the other page, the one i am loading into the iframe.

Fact is that WB has this as an option in the iframe object properties, but it only gives me a global yes/no which effects both the x and y scroll.

Any other suggestion?
Thanks

User avatar
Pablo
 
Posts: 17609
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Scrolling in an iFrame

Post by Pablo » Sat Jan 06, 2018 10:53 pm

Fact is that WB has this as an option in the iframe object properties, but it only gives me a global yes/no which effects both the x and y scroll.
Correct, because that is the only code that is known to work.

This has nothing to do with WWB, the iframes+scrolling is implemented in the browser.

Post Reply

Who is online

Users browsing this forum: alexmasss and 2 guests