Scroll bars, CSS and IE/Firefox

In IE the scroll bar gets placed inside the element that requires the scroll. In firefox the scrollbar is placed outside said element. Bizarrely it seems that IE is the compliant browser on this issue. Anyway to fix the problem of your scroll bars covering your content you can add the following conditional css to your files.

#divid1 is the element that has overflow: auto; defined.

<!--[if IE]>
<mce:style type="text/css"><! 
 #divid1{padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 20 : 5);}
-->
 
<!--[endif]-->

Tags: , ,

Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.