I want to use rounded border in my site. So, I use css rounded border property like this
-moz-border-radius-topright: 7px;
It work in firefox well . But in google chrome , it does not work . Why ?
I want to use rounded border in my site. So, I use css rounded border property like this
-moz-border-radius-topright: 7px;
It work in firefox well . But in google chrome , it does not work . Why ?
-moz-
... is for Firefox etc. Use -webkit-
...:
-webkit-border-top-right-radius: 7px;
-moz-border-radius-topright: 7px;
Also note the slight difference in syntax.
You can combine these as you like. -webkit-
... will only be recognized by WebKit browsers (Chrome, Safari), -moz-
... will only be recognized by Mozilla-based browsers (Firefox.)
Chrome uses WebKit for rendering, same as Safari. You'll have to add one more CSS property to your class -
.YourClass
{
-moz-border-radius-topright: 7px; /* For Mozilla browsers */
-webkit-border-top-right-radius: 7px; /* For WebKit-based browsers */
}
The reason why, is that is a Mozilla specific (i.e. Firefox) CSS selector. The relevant CSS3 selector would be:
border-top-right-radius
Webkit (i.e. Safari) also has a non-standard selector: -webkit-border-top-right-radius. Since Google Chrome is based on Webkit, I'd expect -webkit-border-top-right-radius to work. I'd personally include all 3 selectors (as below), then you won't need to edit sometime in the future when everyone catches up with the standard (Firefox 3.5 is already there as far as I know).
.thing{
...some styles...
-moz-border-radius-topright:7px;
-webkit-border-top-right-radius:7px;
border-top-right-radius:7px;
}