IE vertical scrollbar and overflow:auto
Feb 2nd, 2009 at 6:37 am
filed under: Web Development / CSS
filed under: Web Development / CSS
Comments (0)
I've recently updated all my code samples to display in an easier-to-read format for my readers and came across a couple of bugs/issues. One of them is the overflow:auto vertical scrollbar bug. See the below picture for an example of how the code on my site appears in IE7 with the pre element set to overflow:auto, not very pretty, as we obviously expect the element to expand vertically within the parent container.
Fortunately, it's an easy fix with a small quirks mode snippet as follows;
<!--[if IE]>
<style type="text/css">pre,code {padding-bottom:16px;overflow:visible;overflow-x:auto;overflow-y:hidden}</style>
<![endif]-->
Place that code in the head, just make sure that it is placed after all the other styles.
Comments
No comments posted yet, why not be the first?
Subscribe to comments feed
Categories
Recent Entries
Recent Comments
- Redbeard (I managed to get Vampire: The Masquerade - Bloodlines ...)
- Tina (Installed this today and working like a charm :) Thanks!)
- Tina (Thanks for this great mod :) Working on my site for quite a ...)
- konga (Hi Matt, if you plan to update it, please have a look into ...)
- David (Yo Matt, I have a problem, when I use this mod. ...)
- Dave (Have a Toshiba NB305. Win7 starter would not do screen ...)
- Daichisan (Howdy Matt, I dont really get it, whats ...)
- Matt (Mine is just customized further, that's all :) It just spits ...)
- Matt (David, Do you own or admin the server? Do you have exec ...)
Popular Entries
- Compact archives for sNews 1.7 (5/5)
- Light-weight related articles mod for sNews 1.7 (4.78/5)
- SEF / SEO search for your sNews website (4.75/5)
- 1024x600 netbook wallpapers of Evangeline Lilly (4.67/5)
- Gravatar mod for sNews 1.7 (4.67/5)
- An improved tag cloud for sNews 1.7 (4.67/5)
- Image / math hybrid captcha version 2, vastly improved (4.64/5)
- Related Articles mod for sNews CMS, public beta release (4.6/5)
- An easy mod to create custom break titles for your sNews articles (4.6/5)