Created
          November 10, 2012 17:22 
        
      - 
      
 - 
        
Save leifg/4051813 to your computer and use it in GitHub Desktop.  
    fixed z-index positioning in newest webkit
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- should always be on top --> | |
| <div class="wrapper"> | |
| <div class="overlay"> | |
| overlay | |
| </div> | |
| </div> | |
| <!-- should always be in the back --> | |
| <div class="main"> | |
| main | |
| </div> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | .main { | |
| display: block; | |
| top: 50px; | |
| background-color: green; | |
| width: 800px; | |
| height: 200px; | |
| position: relative; | |
| z-index: 1; | |
| } | |
| .wrapper { | |
| position: fixed; | |
| } | |
| .overlay { | |
| left: 200px; | |
| background-color: blue; | |
| width: 200px; | |
| height: 500px; | |
| z-index: 1000; | |
| position: absolute; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
demonstrating the problem with the latest changes in z-index positioning in google chrome 23:
http://updates.html5rocks.com/2012/09/Stacking-Changes-Coming-to-position-fixed-elements