Browser Inconsistencies with Scrolling and Padding

Wednesday, July 23, 2008 by Dimo Dimov | Comments 3

The other day I was researching a slight RadGrid header and data cell misalignment when using scrolling with static headers. Finally, it turned out that there is a breaking change in the way Firefox 3 treat scrollable elements with an applied padding style. To be more specific, this browser version does not include the padding zone into the scrollable area, and as a result, the inner area of the element becomes smaller. Safari 2 and 3 behave the same way.

Here is a very simple testing scenario:

 

<div style="width:400px"
    <div style="width:100px;padding-right:300px;background:orange;overflow:auto"
        <div style="width:500px;height:100px;background:yellow">&nbsp;</div> 
    </div> 
</div> 
 

 

The above HTML code will be displayed by Firefox 3, Firefox 2, IE7, Opera 9 and Safari 3 as follows:

how browsers display scrollable elements with padding

Because of this inconsistent behavior of Firefox 3, for now this browser will continue displaying the small empty rectangle at the top-right corner above the vertical scrollbar when using RadGrid with scrolling and static headers. We will try to think of a better solution in the future.

3 Comments

  • Jenia 13 Oct
    Is there a solution to this problem?
  • Amit 16 Dec
    hello there is solution of this problem???
  • Dos Anjos 16 Dec
    did you try to put some z-index order? maybe if you  put the orange div in a greater z-index, i think it should work... see ya

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)