The image below should be centered. It is centered on Safari but not on the webkit nightly. <!DOCTYPE html> <html> <head> <style> .Outer { text-align: center; } .Inner { position:relative; height:178px; width:318px; display:inline-block; border:1px solid #aaa; } .Image { position:absolute; top: 0; background:blue;} </style> </head> <body> <div class="Outer"> <div class="Inner"> <img class="Image" src='' width="318" height="178"> </div> </div> </body> </html> Or go here with a mobile user-agent: https://www.google.com/m/places?source=mog&gl=us&sa=N#ipd:gl=us&mode=search&q=ritual%20roasters&source=ipd
Created attachment 167119 [details] Test case This is a test case which demonstrates the problem. It seems that with text-align:center, WebKit is centering the H1 text *as if* the H1's width were offsetWidth + paddingLeft + paddingRight. This test case renders correctly in Safari 6.0.1 and Firefox 15.0.1, but not in Chrome 22.0.1229.79, Chrome 24.0.1286.0 canary, or WebKit r130371 built on 04 October 2012. This problem also affects iOS 6 Mobile Safari, but not iOS 5.1 Mobile Safari. Getting rid of text-align:center fixes the problem in this case because the text width is larger than its container anyway.
See also: Bug 131592
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.