An application I am currently working on has been specifically targeted towards Internet Explorer and a technical design requirement is that the browser window the application is being run in is a fixed size. So inevitably, there will be scrolling.
As part of the design we decided to use a document divided up into sections using DIV
tags and absolutely positioning rather than using frames all around. This leaves the primary content area of the application as an iframe
taking up the majority of the page.
A week or so ago I put some styles in my CSS which were intended to color the scrollbars on the iframe
. Oddly… this didn’t work. I didn’t really attempt to follow up on it until today, at which point I found an interesting solution.
Before, I had the following document definition in my HTML:
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
I changed the definition to:
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
And now things work great. I’m not sure why, maybe when I get some time to look it up I’ll modify this post to reflect whatever reasons I find.
However, if you are having problems with your iframe scrollbars not taking your styles, this could help.