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

Posts: 342
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
 
 
When You Register, These Ads Go Away!
Old 07-30-2010, 07:26 PM Re: Having problem with a.selected...
chrishirst's Avatar
Super Moderator

Posts: 32,241
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
Code Samples | Crowded Nightclub? | Random Ramblings
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-30-2010, 08:14 PM Re: Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 342
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, 08:30 PM Re: Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 342
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, 08:47 PM Re: Having problem with a.selected...
Sleeping Troll's Avatar
Ultra Talker

Posts: 342
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 09:13 PM..
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Old 07-31-2010, 03:15 PM Re: Having problem with a.selected...
LadynRed's Avatar
Super Moderator

Posts: 9,488
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 !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Old 08-01-2010, 09:55 AM Re: Having problem with a.selected...
Physicsguy's Avatar
Dividing by zero

Posts: 367
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.
__________________
ReviewCraft - Minecraft Server Review | MyWebForums
Code:
Warning: Division by zero
Physicsguy is offline
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Old 08-01-2010, 10:32 AM Re: Having problem with a.selected...
LadynRed's Avatar
Super Moderator

Posts: 9,488
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 !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
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.15082 seconds with 13 queries