Fix overflow:auto display in IE

If you want an overflow code snippet to be displayed correctly in IE, you must write some more css code to fix a vertical scrollbar bug.

As far as Byteflow concerned, simply add the following code to highlight.css.

* html pre code { /* for IE6 */
   overflow: visible;
   overflow-x: auto;
   overflow-y: hidden;
   padding-bottom: 15px;
}

*:first-child+html pre code { /* for IE7 */
   overflow: visible;
   overflow-x: auto;
   overflow-y: hidden;
   padding-bottom: 15px;
}

That’s it.

Please call me an idiot. It is still continued a bit more.

First, the following line is meaningless in this case.

   overflow: visible;

And second, It seems to me that IE6 can’t display horizontally overflowed code correctly whether above steps are added or not. One dirty solution imaginable for me is adding width property and I easily take this for the moment.

   width: 550px;

Since content width depends on the theme I chosen, these steps might have been added to theme’s css.

Add post to:   Delicious Reddit Slashdot Digg Technorati Google
Make comment

Comments

same codes i got last, i hope this is the answer

I’ve found that by using CSS position: relative (and a couple of other things) solves the problem. What a pain that it doesn’t matter in any other browser except IE!

Read more: http://www.kelpdesign.com/tech-talk/cssfixing-overflow-hidden-in-ie-for-css/

Required. 30 chars of fewer.

Required.

captcha image Please, enter symbols, which you see on the image