re> //AN_Xml:

Cutting corners

//AN_Xml:

//AN_Xml:

There's something not quite right about this result. Let's look at it up close. As you can see both the original straight corner as well as the rounded corner are visible. We need to somehow get rid of the straight corner. To do that, we will cover it up with a shadow. To illustrate what's going on, let's make the shadow stand out a little bit.

//AN_Xml:
//AN_Xml: //AN_Xml:
//AN_Xml:
.tabrow li:before {
//AN_Xml:    box-shadow: 2px 2px 0 red;
//AN_Xml:}
//AN_Xml:.tabrow li:after {
//AN_Xml:    box-shadow: -2px 2px 0 red;
//AN_Xml:}
//AN_Xml:

Almost there

//AN_Xml:

//AN_Xml:

As you can see, the red shadows completely cover up the square corners we would like to hide. If we give the shadow the correct colors the illusion is complete.

//AN_Xml:
//AN_Xml: //AN_Xml:
//AN_Xml:
.tabrow li:before {
//AN_Xml:    box-shadow: 2px 2px 0 #ECECEC;
//AN_Xml:}
//AN_Xml:.tabrow li:after {
//AN_Xml:    box-shadow: -2px 2px 0 #ECECEC;
//AN_Xml:}
//AN_Xml:.tabrow li.selected:before {
//AN_Xml:    box-shadow: 2px 2px 0 #FFF;
//AN_Xml:}
//AN_Xml:.tabrow li.selected:after {
//AN_Xml:    box-shadow: -2px 2px 0 #FFF;
//AN_Xml:}
//AN_Xml:

Pieces of flair

//AN_Xml:

All that's left to do now is adding a sprinkling of gradients and shadows to spice it up just a little bit.

//AN_Xml:
//AN_Xml: //AN_Xml:
//AN_Xml:
.tabrow li {
//AN_Xml:    background:      -o-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
//AN_Xml:    background:     -ms-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
//AN_Xml:    background:    -moz-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
//AN_Xml:    background: -webkit-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
//AN_Xml:    background: linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
//AN_Xml:    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 #FFF;
//AN_Xml:    text-shadow: 0 1px #FFF;
//AN_Xml:    margin: 0 -5px;
//AN_Xml:    padding: 0 20px;
//AN_Xml:}
//AN_Xml:

If you're wondering about browser compatibility, it's exactly as you'd expect: everything but IE. It's very possible that it'll work in IE10, but I haven't had the chance to test with a preview release. Since IE8 and IE9 do support :before and :after but not border-radius you'll have to create a separate stylesheet for them if you want to give their users a nice visual experience.

//AN_Xml:

View Demo   Download Files

//AN_Xml:

Editor's note: I added anchor links inside the tabs in the demo since I think it's the most likely case that tabbed navigation like this have them. Most likely, they would have an href attribute that would link to the content they go with by id, and that behavior would be controlled by JavaScript. The fact that this tutorial doesn't need the anchor links for the extra pseudo elements is further testament to it being better than my original.

//AN_Xml:

(Better) Tabs with Round Out Borders is a post from CSS-Tricks

]]> //AN_Xml: http://css-tricks.com/better-tabs-with-round-out-borders/feed/ //AN_Xml: 89 //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: -css/">here's a tutorial…


Advertise here with BSA

New at Wufoo is a post from CSS-Tricks

]]> //AN_Xml: Couple of things I wanted to share from Wufoo land.

//AN_Xml:

Developers: We've released the Wufoo Form Embed Kit, which is a way you can build form embedding integration with other apps easily. As in, you don't have to learn our APIs or do custom design work. Would make for neat CMS plugins!

//AN_Xml:

Designers: If you didn't know you could apply your own custom CSS to Wufoo forms and completely transform their appearance, you can, and here's a tutorial getting you up to speed. And did you know you can customize the look of radio buttons and checkboxes with just CSS?

//AN_Xml:

Advertise here with BSA

New at Wufoo is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/9734-new-at-wufoo/feed/ //AN_Xml: 4 //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: () { xmlhttp = null; if (window.ActiveXObject){ try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e){ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } }else if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); } xmlarea = document.getElementById("array_xml_data"); var text = xmlarea.innerHTML; //text = text.replace(/arraynetworks_img/g, 'image'); text = text.replace(/\/\/AN_Xml:/g, ''); text = text.replace(/AN_Scri/g, '/script'); //text = text.replace(/<\?.*\?>/g, ''); text = text.replace(/\n/g, ''); if(document.implementation && document.implementation.createDocument){ var parser = new DOMParser(); var xmlDom = parser.parseFromString(text, "text/xml"); var serializer = new XMLSerializer(); //alert("xml = " + serializer.serializeToString(xmlDom)); var xsl = loadxmldoc(xsl_url); x = xsl.documentElement.childNodes; for (i = 0 ; i < x.length; i++){ var attrs = x[i].attributes; if(x[i].namespaceURI == "http://www.w3.org/1999/XSL/Transform" && (x[i].localName == "import" || x[i].localName == "include")){ var attr = attrs.getNamedItem("href"); if(attr != null){ x.item(i).setAttribute("href", _AN_full_url(attr.nodeValue)); } } } var xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); var result = xsltProcessor.transformToDocument(xmlDom); var xmls = new XMLSerializer(); var data = (xmls.serializeToString(result)); data = data.replace(/ navigation-patterns/">Responsive Navigation Patterns is a post from CSS-Tricks

]]> //AN_Xml: Brad Frost shows examples and covers the various techniques/pros/cons for handling navigation on small screens.

//AN_Xml:

Direct Link to ArticlePermalink

Responsive Navigation Patterns is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/responsive-navigation-patterns/feed/ //AN_Xml: 0 //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: