Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use rounded borders with CSS?

Tags:

css

border

Is there a way in the newer CSS standards to provide round borders? It is not possible in CSS level 2.

like image 639
thenengah Avatar asked Dec 13 '22 20:12

thenengah


1 Answers

Yes. CSS3 already has it.

Many browsers already have it.

  • In Mozilla/gecko browsers you need -moz-border-radius though they are transitioning to border-radius.
  • In Safari/Chrome/webkit browsers you need -webkit-border-radius.
  • IE9 and above need border-radius (IE8 and below don't support it at all).
  • In the future when CSS3 is widely adopted you'll just need border-radius in all browsers.

At the moment it's a good idea to use all three, plus -o-border-radius if you're worried about Opera.

like image 124
thomasrutter Avatar answered Dec 24 '22 11:12

thomasrutter