Thursday, February 4, 2010

Wordpress - rounded tab corners

Firefox and Chrome recently included the ability to create rounded corners in CSS or style sheets.  After some playing around I was finally able to get it to actually work.  Google Chrome also has support for rounded corners under the name 'webkit'.  Note that the paramaters have to be different for Firefox and for Chrome.  The 4px parameter sets the size in pixels of the corners.

Here is the CSS to make it all work;

#nav li {
float: left;
border-top: solid white;
border-left: solid white;

#nav a, #nav a:visited {
display: block;
text-decoration: none;
padding:5px 12px;
border-top: 1px solid gray;
border-right: 1px solid gray;
border-left: 1px solid gray;

Here is what the rounded corners look like in tabs.

Post a Comment