Forum Moderators: open

Message Too Old, No Replies

Objects, Iframes, XHTML Compliance, and Scrollbars

Objects, Iframes, XHTML Compliance, and Scrollbars

         

rolandog

7:14 pm on Jan 10, 2006 (gmt 0)

10+ Year Member



Hello Webmaster World forum members. This is my first post here. I tried to reply to this message [webmasterworld.com] but couldn't since it is quite old.

My problem is that upon changing the content using objects instead of iframes, two ugly scrollbars appear. After changing the width and height using Firefox, the scrollbars disappear, but in Internet Explorer the vertical scrollbar doesn't. It just stays there, but remains unscrollable.

The code used is this:

<object id="radio" type="text/html" data="/radio.blog/index.php" width="220" height="320">Radio.Blog out to lunch.</object>

I tried using CSS to deal with it (overflow: hidden;), and either by Id or by tag (object tag), but nothing seems to work. Any ideas as to how to achieve the same attribute as scrolling="no" used in the iframes of yonder?

Trace

7:42 pm on Jan 10, 2006 (gmt 0)

10+ Year Member



<object id="radio" type="text/html" data="something.html" width="220" height="320">Radio.Blog out to lunch.</object>

and in the body of something.html
<body scroll=no>

That works, however it won't validate.

rolandog

9:42 pm on Jan 10, 2006 (gmt 0)

10+ Year Member



Thanks a lot Trace. I tried it and it works like a charm.

Upon further research for a more compliant way, I found that using stylesheets with "border:none" on the html element and "overflow:hidden" also do the trick.

[edited by: tedster at 12:24 am (utc) on Jan. 11, 2006]

encyclo

11:49 am on Jan 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums rolandog!

I'm glad you've found a solution to your particular problem. Using

object
instead of
iframe
is always going to be problematic in IE, and it will be for the forseeable future. Usually it is a batter bet to use
iframe
and stick to XHTML 1.0 instead.

rolandog

5:08 pm on Jan 11, 2006 (gmt 0)

10+ Year Member



Hi encyclo, thanks for the kind welcome. The solution I tried actually didn't work. I now discovered that it has to be done twice. The overflow:hidden and

I had to place the following in the stylesheet of the text/html object:

html {
border:none;
overflow:hidden;
}
body {
margin: 0;
padding: 0;
border:none;
overflow:hidden;
}

That does the job for me (either in XHTML 1.1 as application/xhtml+xml or as HTML 4.01 strict as text/html).

But, you're right about IE quirks... they're mostly unavoidable.