The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Remove scroll bar from iframe, Show iframe without a vertical scroll bar
CharlesEF
post Feb 3 2019, 06:56 PM
Post #1


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Hi All,

Ok, what is the trick to removing the scroll bar from an iframe. HTML5 specs state that CSS should be used but 'overflow: hidden;' has no effect. The only thing that does work is 'scrolling="no"' but HTML5 doesn't support it. The container that holds the iframe is big enough and the scroll bar should not appear but it does.

Does this mean I have to use HTML4 instead of HTML5?


Thanks for any help,

Charles
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
CharlesEF
post Feb 6 2019, 11:33 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



I always thought that <iframe>Text in here</iframe> was valid. It should show the text when <iframe> isn't available. HTML5 reports this as an error, says text not allowed. Has this changed?

This post has been edited by CharlesEF: Feb 6 2019, 11:34 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 6 2019, 12:49 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(CharlesEF @ Feb 6 2019, 05:33 PM) *

I always thought that <iframe>Text in here</iframe> was valid. It should show the text when <iframe> isn't available. HTML5 reports this as an error, says text not allowed. Has this changed?

Can't say really, the parts I bolded seem to contradict each other:
"An <iframe> element never has fallback content, as it will always create a nested browsing context, regardless of whether the specified initial contents are successfully used.
[...]
Descendants of <iframe> elements represent nothing. (In legacy user agents that do not support <iframe> elements, the contents would be parsed as markup that could act as fallback content.)

When used in HTML documents, the allowed content model of <iframe> elements is text, except that invoking the HTML fragment parsing algorithm with the <iframe> element as the context element and the text contents as the input must result in a list of nodes that are all phrasing content, with no parse errors having occurred, with no script elements being anywhere in the list or as descendants of elements in the list, and with all the elements in the list (including their descendants) being themselves conforming.

The <iframe> element must be empty in XML documents."
https://www.w3.org/TR/html5/embedded-conten...-iframe-element

unsure.gif

I ranted a little about HTML5 iframes here: http://forums.htmlhelp.com/index.php?showtopic=19970 but I still don't understand what pandy is trying to say. tongue.gif


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 6 2019, 01:18 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



From the drupal page I linked to.

According to the HTML living standard, the content model here is "nothing", meaning it shouldn't contain text.

The spec itself is incomprehensible to me. cool.gif
I've said it before, the loss of DTDs was a bad move. I know there were reasons, but this convoluted blah blah kills me.

Or do you mean about the scroll bars? Your CSS still doesn't work for me. I thought it magically did because I had forgotten I had made overflow hidden on BODY in the framed page.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 6 2019, 01:55 PM
Post #5


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Feb 6 2019, 07:18 PM) *

Or do you mean about the scroll bars?

No I meant the old thread I linked to, but nevermind.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
CharlesEF   Remove scroll bar from iframe   Feb 3 2019, 06:56 PM
Christian J   This works in my browsers: iframe { height: 3...   Feb 4 2019, 06:20 AM
pandy   This works in my browsers: [code]iframe { height...   Feb 6 2019, 01:34 AM
Christian J   Charles, try to add the following to the CSS for ...   Feb 6 2019, 05:20 AM
pandy   [quote name='pandy' post='136746' date='Feb 6 201...   Feb 6 2019, 11:42 AM
pandy   Ah! I had of course added overflow: hidden to ...   Feb 6 2019, 12:19 PM
CharlesEF   No, it doesn't work for me. I tried it on the...   Feb 4 2019, 01:33 PM
CharlesEF   I put together a basic page to show my problem. S...   Feb 5 2019, 10:35 PM
CharlesEF   Yeah, it worked! :D I added a 'style...   Feb 6 2019, 02:16 AM
CharlesEF   I always thought that <iframe>Text in here...   Feb 6 2019, 11:33 AM
pandy   I always thought that <iframe>Text in here...   Feb 6 2019, 12:45 PM
Christian J   I always thought that <iframe>Text in here...   Feb 6 2019, 12:49 PM
pandy   From the drupal page I linked to. According to th...   Feb 6 2019, 01:18 PM
Christian J   Or do you mean about the scroll bars? No I mean...   Feb 6 2019, 01:55 PM
pandy   Or do you mean about the scroll bars? No I mea...   Feb 6 2019, 02:40 PM
CharlesEF   Thanks to both of you. I guess I must be remember...   Feb 6 2019, 01:41 PM
CharlesEF   FYI, I ran across a situation where I needed the v...   Feb 8 2019, 01:07 PM
Christian J   I suppose you could use "overflow-y" to ...   Feb 8 2019, 01:42 PM
CharlesEF   I suppose you could use "overflow-y" to ...   Feb 8 2019, 04:01 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 01:02 PM