IE Bug With XHTML And iframe

Roo's picture

She has: 840 posts

Joined: Apr 1999

Just wanted to post this info and fix. I drove myself nuts trying to fix this issue, until I finally found out that it is an IE Bug.

IE has a bug with XHTML Transistional and the use on an iframe.

Use XHTML and an iframe, and IE will display a horizontal scrollbar on the iframe, no matter what you do...it isn't going to go away.

The fix is to add this to your stylesheet:

html {
overflow-y: scroll;
}

• Edit •
This goes into the sylesheet for the pages loding into the iframe, not on the page actually containing the iframe.
• Edit •

It does valiadte but you will get a warning below your congratulations blurb:

Line : 18 property overflow-y does not exist for this profile, but is validated conforming to another profile

Just wanted to share so that others who run into the problem will know it's a bug.

Roo

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Thanx for sharing Smiling

But I believe that defining a proper width should make the scrollbar go away. I'll dig into this tonight, cause I'm at work right now.

Shakespeare: onclick || !(onclick)

Roo's picture

She has: 840 posts

Joined: Apr 1999

Nope it won't...I promise...it's a bug!

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

By the sounds of it Roo has done quite extensive testing of this bug Jack... You can try but you'll only end-up as frustrated as Roo is! Laughing out loud

Thanks for sharing Roo, dont you just love ie - it's not a bug, it's a feature! Wink

a Padded Cell our articles site!

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Check this site of mine

I know it doesn't validate XHTML Transitional (for other reasons, I should update it, oh oh where's some spare time Wink), but if you look at the 'dance music window', you'll see an iframe with no horizontal scrollbar. And I didn't use the overflow-y property.

Could be that I made somes mistakes, I make them all the time Wink but still: no overflow-y and no horizontal scrollbar.

Shakespeare: onclick || !(onclick)

Roo's picture

She has: 840 posts

Joined: Apr 1999

Now try it with valid XHTML trans and valid CSS.

Well...that site is totally fudged in IE6. And I get a browser horizontal, scrollbar with both IE and Mozilla

It wasn't extensive testing, it was hair pulling site troubleshooting.

I wish I could recall the site where I found the info and fix, but I can't even remember the search words I used that finally found me a solution.

Try it!

Valid XHTML and CSS on both the iframed page, and the content pages....you'll see!

Roo

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

That's interesting... ie iframe bug - "you heard it here first!" Laughing out loud

May many google searches land frustrated designers on this page, congrats on finding the solution Roo Smiling

a Padded Cell our articles site!

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

yip, thanks for the heads up Roo Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.