The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Nav code problem [punBB]

3 posters

Go down

Nav code problem [punBB] Empty Nav code problem [punBB]

Post by Kyouri April 10th 2010, 8:51 pm

Everything works fine on the nav bar - a, a:hover - except the 'active' part, it reverts back to the original 'a'.

Here's the code I've created and would like feedback on either what is wrong with this code, if it's a browser issue (Firefox), or if it's a tech issue, please:
Code:
#pun-navlinks {
        margin: 5px auto;
        max-width: 825px;
        min-width: 825px;
        background-color: transparent;
        background-image: url('http://i60.servimg.com/u/f60/14/50/54/28/lotusn11.png');
        background-position: top center;
        background-repeat: no-repeat;
        }

#pun-navlinks ul li a {
        width: auto;
   padding: 5px;
   margin: 150px 0px 0px 1px;
   text-align: center;
        vertical-align: text-bottom;
   text-decoration: none;
        color:#ffffff;
        letter-spacing: 2px;
        border-top: 2px solid #50443D;
        border-right: 2px solid #50443D;
        border-left: 2px solid #50443D;
        -moz-border-radius-topleft: 7px;
        -moz-border-radius-topright: 7px;
        -webkit-border-top-left-radius: 7px;
        -webkit-border-top-right-radius: 7px;
        background-color: #0D0805;
        }

#pun-navlinks ul li a:visited {
   text-decoration: none;
        color:#ffffff;
        letter-spacing: 2px;
        border-top: 2px solid #50443D;
        border-right: 2px solid #50443D;
        border-left: 2px solid #50443D;
        -moz-border-radius-topleft: 7px;
        -moz-border-radius-topright: 7px;
        -webkit-border-top-left-radius: 7px;
        -webkit-border-top-right-radius: 7px;
        background-color: #0D0805;
        }

#pun-navlinks ul li a:hover {
        background-image: url('');
        background-repeat: no-repeat;
        background-position: center bottom;
        background-color:#50443d;
        border-top: 2px solid #A5A5A5;
        border-right: 2px solid #A5A5A5;
        border-left: 2px solid #A5A5A5;
        color:#000000;
        height:100%;
        text-align: center;
        text-decoration: none;
   }

#pun-navlinks ul li a:active {
        background-image: url('');
        background-repeat: no-repeat;
        background-position: center bottom;
        background-color:#50443d;
        border-top: 2px solid #A5A5A5;
        border-right: 2px solid #A5A5A5;
        border-left: 2px solid #A5A5A5;
        color:#000000;
        height:100%;
        text-align: center;
        text-decoration: none
        }

#pun-navlinks ul li a:focus {
        background-image: url('');
        background-repeat: no-repeat;
        background-position: center bottom;
        background-color:#50443d;
        border-top: 2px solid #A5A5A5;
        border-right: 2px solid #A5A5A5;
        border-left: 2px solid #A5A5A5;
        color:#000000;
        height:100%;
        text-align: center;
        text-decoration: none
        }

#pun-navlinks ul li a:this {
        background-image: url('');
        background-repeat: no-repeat;
        background-position: center bottom;
        background-color:#50443d;
        border-top: 2px solid #A5A5A5;
        border-right: 2px solid #A5A5A5;
        border-left: 2px solid #A5A5A5;
        color:#000000;
        height:100%;
        text-align: center;
        text-decoration: none
        }

As you can see, I've even tried adding the '.this a' code (and previously tried the 'a:this' code) and it's still not working.
Thanks in advance.
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 11th 2010, 8:26 pm

bump
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 14th 2010, 8:28 am

bump
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 15th 2010, 9:05 am

bump
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 16th 2010, 8:00 am

bump
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 17th 2010, 10:14 pm

bump
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Greenbird April 18th 2010, 2:01 am

Wait what does it do?
Greenbird
Greenbird
Forumember

Male Posts : 32
Reputation : 0
Language : English
Location : Arizona

http://www.iconicgamerz.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 21st 2010, 10:48 am

It's a code so when you click on a tab that tab should be a different color when you are on that tab's page. But it's still not working.... so... bump
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by ankillien April 21st 2010, 11:08 am

Kyouri wrote:It's a code so when you click on a tab that tab should be a different color when you are on that tab's page. But it's still not working.... so... bump

Hello,

Its not like that. The :active pseudo class doesn't work that way.
A link is said active when you click it. But, as soon as you click somewhere else, it will become inactive.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 22nd 2010, 6:04 am

Does that mean if you click somewhere else on that tab's page that the tab will no longer remain the 'active' color? Is that a glitch with FM, cause to the best of my knowledge of visiting several internet sites, the page you're viewing has that tabs color set to be different than the other tabs until you click on another tab. Once you go to a different page, then that page's tab becomes the 'active' color. That's how I understand it to work. If that is right, then it's not working on my board. Sad
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by ankillien April 22nd 2010, 7:16 am

Forumotion has no glitch. The active tab color thing you see on other sites is achieved by adding a special CSS class.

There are no special CSS class assigned to active tab on Forumotion forums, so its not possible for us.



An element is considered active when you click it. As soon as you click somewhere else, the previous one will go inactive and no 2 elements can remain active together.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by Kyouri April 22nd 2010, 8:21 am

Ok, no offense, but I do understand that two elements cannot be active at the same time (ie, two pages open in the tabs of your browser - only the page you are on has the highlighted tab while the others remain shadowed [inactive]).

As for the special class, I assume you are saying that the special class I tried to add '#pun-navlinks ul li a:this' is what you are referring to as not being an available class to add to Forumotion's CSS, as that is the code that seems to work on other sites? If you would please, if the 'active' code isn't the code that should remain in active color on FM, what is the 'focus' code for? Perhaps I'm getting them confused. Confused And btw, thanks for responding to this thread. Smile
Kyouri
Kyouri
Forumember

Female Posts : 165
Reputation : 0
Language : English

http://anime-dohyou.phpbb9.com

Back to top Go down

Nav code problem [punBB] Empty Re: Nav code problem [punBB]

Post by ankillien April 22nd 2010, 9:05 am

To make the active tab and shadowed tab thing is not possible with the :active class. The main purpose of using :active is different that what you are thinking.

On other sites, a completely different technique is utilized to apply this effect. You should try searching some tutorials on the active pseudo class.

Sorry if I confuse you.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum