| | #1 |
| Advanced Warrior War Room Member Join Date: 2009 Location: cyberspace
Posts: 823
Thanks: 84
Thanked 179 Times in 145 Posts
|
I'm trying to style navbar tabs. I have two pieces of code that work, but I need more control over the individual tabs and not sure how to do it. These tabs are under the header and the far right. And I'm trying to round the bottom left corner of only the first tab. The two code snippets below both round the bottom left of every tab in the nav bar. I'd like to figure out the proper code that would give me control over each tab and allow me to style each tab individually. The 2 snippets below get me halfway there, just not sure which is better to be improved on. Code: .custom .menu, .custom .menu a, .custom .menu li ul {
-moz-border-radius-bottomleft:.5em; font-weight:bold;
-webkit-border-bottom-left-radius:.5em; font-weight:bold;
-moz-border-radius-bottomright:.0em;
-webkit-border-bottom-right-radius:.0em;} Code: /* Remove the border from the far left. */
ul.menu{border-left:0;}
/* Add the left border back in. If you change the color of the nav border in the WordPress admin panel, you will also have to manually change the left border color below. */
ul.menu li.tab-1 a{
border-left:1px solid #CCC;
-moz-border-radius-topleft:.5em;
-webkit-border-top-left-radius:.5em;}
/* This creates the rounded borders. */
ul.menu li.tab a{
-moz-border-radius-bottomleft:.5em; font-weight:bold;
-webkit-border-bottom-left-radius:.5em; font-weight:bold;
-moz-border-radius-topright:.0em;
-webkit-border-top-right-radius:.0em;} |
| |
| | #2 |
| "Living The IM Dream" War Room Member Join Date: 2008 Location: Melbourne, Australia
Posts: 146
Thanks: 7
Thanked 33 Times in 16 Posts
|
For stuff like this you're better off trying stackoverflow.com - you'll get half a dozen responses in about 30 seconds!!! Best SITE ever for coding!!!
|
| |
| | #3 |
| Active Warrior War Room Member Join Date: 2010
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
|
Hi Expert here. Hit me for details |
| |
| | #4 |
| Web Developer Join Date: 2010 Location: Wisconsin
Posts: 322
Thanks: 2
Thanked 80 Times in 74 Posts
|
The tab that you want rounded should have an ID or a class not used anywhere else. Then style that id. <ul id="tabs"> <li id="first">First Tab</li> <li>Second Tab</li> </ul> All tabs #tabs li { } Now style the fist tab #tabs li#first{ } |
| | |
| |
|
| Bookmarks |
| Tags |
| code, snippet |
| |