Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 17th Jan 2011, 03:27 PM   #1
Advanced Warrior
War Room Member
 
BenQ's Avatar
 
Join Date: 2009
Location: cyberspace
Posts: 823
Thanks: 84
Thanked 179 Times in 145 Posts
Default
I need some help on this code snippet - please
Share on: 
fb share twitter share gplus share more share

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;}
or this:
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;}
BenQ is offline  
Unread 18th Jan 2011, 05:40 AM   #2
"Living The IM Dream"
War Room Member
 
doop's Avatar
 
Join Date: 2008
Location: Melbourne, Australia
Posts: 146
Thanks: 7
Thanked 33 Times in 16 Posts
Default
Re: I need some help on this code snippet - please
Share on: 
fb share twitter share gplus share more share

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!!!
doop is offline  
Unread 18th Jan 2011, 06:26 AM   #3
Active Warrior
War Room Member
 
Join Date: 2010
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default
Re: I need some help on this code snippet - please
Share on: 
fb share twitter share gplus share more share

Hi
Expert here. Hit me for details
indianbill007 is offline  
Unread 19th Jan 2011, 03:07 PM   #4
Web Developer
 
Join Date: 2010
Location: Wisconsin
Posts: 322
Thanks: 2
Thanked 80 Times in 74 Posts
Default
Re: I need some help on this code snippet - please
Share on: 
fb share twitter share gplus share more share

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{

}

phpbbxpert is offline  
Closed Thread


Bookmarks

Tags
code, snippet


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 11:03 AM.