Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Having problem with a.selected...
Old 07-30-2010, 08:20 PM Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
This is the site http://ticktach.com Notice the news source buttons at the bottom, if you click on one you will see the selected border appear around it, I would like instead for the highlight to stay...

This is my css that I thought should accomplish this...

Code:
.nav ul li a:hover 
{ 
    background:url(../images/bg_nav_left.png) no-repeat;
    color:#000;
    text-decoration:none;
}

.nav ul li a:hover span 
{
    background:url(../images/bg_nav_right.png) no-repeat top right;
}

.nav ul li a.selected 
{ 
    background:url(../images/bg_nav_left.png) no-repeat; 
    color:#000; 
    text-decoration:none;
}

.nav ul li a.selected span 
{
    background:url(../images/bg_nav_right.png) no-repeat top right;
}
Can anyone tell me why this is not working?
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-30-2010, 08:26 PM Re: Having problem with a.selected...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,488
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
and how do you set the class selected on the element?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-30-2010, 09:14 PM Re: Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
Code:
<div id = "extension" class = "nav">
                 <ul>
                    <li><a href = # onclick = "searchrequest('News','site:barrons.com',10);"><span>Barrons</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:bloomberg.com',10);"><span>Bloomberg</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:reuters.com',10);"><span>Reuters</span></a></li>                        
                    <li><a href = # onclick = "searchrequest('News','site:wsj.com',10);"><span>WSJ</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:smartmoney.com',10);"><span>Smart Money</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:moneycentral.msn.com',10);"><span>MSN Money</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:marketwatch.com',10);"><span>Market Watch</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:cnbc.com',10);"><span>CNBC</span></a></li>
                    <li><a href = # onclick = "searchrequest('News','site:msnbc.com',10);"><span>MSNBC</span></a></li>
                </ul>
            </div>
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Old 07-30-2010, 09:30 PM Re: Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
I believe you are saying I need to change the class of the a tag to "selected"?
I thought that it was a property...
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Old 07-30-2010, 09:47 PM Re: Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
OK, now my head hurts... The "selected" element displays a dashed border, what css property is responsible for that?
Yeah, ok "focus"... so that won't work anyway... Anybody got a link to get me through this little boondoggle?
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!

Last edited by Sleeping Troll; 07-30-2010 at 10:13 PM..
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Old 07-31-2010, 04:15 PM Re: Having problem with a.selected...
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
.selected is NOT a property at all, it is a class that YOU define.

As for the dotted outline, it is there for accessibility purposes and you should not remove it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-01-2010, 10:55 AM Re: Having problem with a.selected...
Physicsguy's Avatar
404 - Title not found

Latest Blog Post:
Challenges
Posts: 818
Name: Scott
Location: Ontario
Trades: 0
Ah, I remove the dotted outline on some things.

Only things like linked images where it goes all the way across the page or links that look bad when you click them.
__________________
Check out my
Please login or register to view this content. Registration is FREE
Physicsguy is online now
Reply With Quote
View Public Profile
 
Old 08-01-2010, 11:32 AM Re: Having problem with a.selected...
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
It might look bad to you - you can see! For someone using assistive technology, like the blind, you are disabling functionality.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Having problem with a.selected...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27546 seconds with 12 queries