views:

260

answers:

1

Hello everybody

I am using -webkit-transform (and -moz-transform / -o-transform) to rotate a div. Also have position fixed added so the div scrols down with the user.

In Firefox it works fine, but in webkit based browsers it's broken. After using the -webkit-transform, the position fixed doesn't work anymore! How is that possible?

+1  A: 

After some research, there has been a bug report on the Chromium website about this issue, so far Webkit browsers can't render these two effects together at the same time.

I would suggest adding some Webkit only CSS into your stylesheet and making the transformed div an image and using it as the background.

        @media screen and (-webkit-min-device-pixel-ratio:0) {
            /* Webkit-specific CSS here (Chrome and Safari)*/

    #transformed_div {
    styles here, background image etc }
}

So for now you'll have to do it the old fashioned way, until Webkit browsers catch up to FF.

Kyle Sevenoaks
@Kyle Sevenoaks Tnx for your awnser. Helps a lot :).
iSenne
No problem, glad to help :)
Kyle Sevenoaks
Just so u know. I decided to remove the button in webkit based browsers :). Customer doesn't use it anyway. Until webkit based browser catch up with ff, I don't support it. Not the best solution, but for now the quickest...
iSenne
Well that makes sense if the customers don't even use it, why bother putting it in? Hope that Webkit catches up, also that the other browsers catch up to the webkit transitions!
Kyle Sevenoaks
That would be really nice. There are a lot of CSS3 functions I want to use :). So you know, I made (my first) a jQuery plugin for it. http://bit.ly/cVWxvR. Really simple, but usefull!
iSenne
I have used CSS3 functions for the special users of webkit browsers, but others just have to wait. Making jQuery plugins is a great way to go about it, keep up the good work!
Kyle Sevenoaks