{"id":15939,"date":"2012-01-10T11:07:20","date_gmt":"2012-01-10T18:07:20","guid":{"rendered":"http:\/\/css-tricks.com\/?p=15939"},"modified":"2015-03-28T05:55:20","modified_gmt":"2015-03-28T12:55:20","slug":"better-tabs-with-round-out-borders","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/better-tabs-with-round-out-borders\/","title":{"rendered":"(Better) Tabs with Round Out Borders"},"content":{"rendered":"
The following is a guest post by Menno van Slooten<\/a>. You might notice we’ve been down this road before<\/a>, but I quite like Menno’s approach here. The end result proves you can get a little fancier with the design than I originally did, with borders, gradients, and shadows and while actually using less elements.<\/div>\n

\"\"<\/p>\n

A good-looking tab control usually has one feature that I’ve always found impossible to reproduce without images: borders that bend to the outside<\/em> at the bottom of each tab. In this article I would like to show how you can use the CSS :before<\/code> and :after<\/code> pseudo elements to create this effect without using images. First, let’s start with some basic markup.<\/p>\n

The markup<\/h3>\n
<ul class=\"tabrow\">\r\n   <li>Lorem<\/li>\r\n   <li>Ipsum<\/li>\r\n   <li class=\"selected\">Sit amet<\/li>\r\n   <li>Consectetur adipisicing<\/li>\r\n<\/ul><\/code><\/pre>\n

This would be about as basic as you can get. Not a lot of elements to work with here, but it will do.<\/p>\n

Getting started<\/h3>\n

To get started, let’s get rid of the default <ul><\/code> and <li><\/code> styling and get these babies in line.<\/p>\n

\n