.tabbar_homepage li.current a b {
To explain what this is doing we have the first bit .tabbar_homepage which means that what we're going to be working with is anything with that class applied. Second is li which tells it any list-item element which that class applied, thirdly we have .current which applies ONLY to list-items within the tabbar_homepage class ie.,
<div class="tabbar_homepage">
<ul><li class="current">blah</li></ul>
</div>
Next, we have a which will look for an anchor (a) TAG, ie., <a href="hello.html">Hello</a> . Now keep in mind that that was looking for a TAG, so when we get to the b bit it is looking for a b TAG ie., <a href="hi.html"><b>Hello</b></a> So to match that style you would need this:
<!-- I'm using div as a container, doesn't matter what you use -->
<div class="tabbar_homepage">
<ul>
<li class="current"><b><a href="test.html">Test</b></a></li>
</ul>
</div>
So, after all that, we realize that there is no class ab which is what you were looking for, since it is looking for the b tag inside the a tag.
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
So, after all that, we realize that there is no class ab which is what you were looking for, since it is looking for the b tag inside the a tag.
And to take this one step further and answer the original question...
I'm thinking you need to change
.ivt ab:hover {
to...
.ivt a:hover b {
In the original example, you're looking for a <b> tag inside of an <a> tag (as Shawn pointed out). So now you want to look for a <b> tag inside of an <a> tag with the psuedo-class hover. Hence a:hover b .
Walkere
Junior Poster in Training
57 posts since Jan 2008
Reputation Points: 29
Solved Threads: 5
have a similar problem: i have my #nav_bar id with a .first class, which i have originally with an image. but, i want it to change image when it's hovered on, like this:
#nav_bar .first:hover
{
background-image:url(image2.gif);
}
<table cellpadding="0" cellspacing="0" id="nav_bar">
<tr>
<td id="first"><a href="yada yada">yada yada</a></td>
</tr>
</table>
but nothing happens...
am i doing something wrong?
originally i had this:
#nav_bar td
{
background-image:url(image1.gif);
}
#nav_bar td:hover
{
background-image:url(image2.gif);
}
<table cellspacing="0" cellpadding="0" id="nav_bar">
<tr>
<td><a href="yada yada">yada yada</a></td>
</tr>
</table>
and it worked perfectly, but then i added some elements at the sides of the navigation bar buttons which i don't want affected by the hover.
Nichito
Posting Virtuoso
1,602 posts since Mar 2007
Reputation Points: 424
Solved Threads: 57
If you want your websites to be handicap-accessible, do not use hover images.
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
If you want your websites to be handicap-accessible, do not use hover images.
I think that paints the problem with far too broad a brush. Why would you have to get rid of all hover images in order to be handicap accessible?
Example. A hover image could be used to change the background of a link, simply to show that it is "hovered." Same way you would change the color of a link to show your mouse is over it. Purely visual, doesn't effect the functionality of the site. No reason it'll impair use by someone that won't be able to see the hover image.
Example. If you use a css-hover menu, you can use an alternate style sheet to make all of the links displayed, rather than not displayed until moused over.
There may be some cases where using hover images might impair the use of your website by someone using a screen reader - but there are plenty of situations where youcan accommodate handicap users by making accessibility modifications.
We didn't make the world flat for people with wheelchairs. We built ramps.
- Walkere
Walkere
Junior Poster in Training
57 posts since Jan 2008
Reputation Points: 29
Solved Threads: 5
True. But there are more troubles than those you mention:
- It causes problems for dyslexic people. making it hard for them to read the text. The change sort of resets the perceived visual image, and the person has to start reading it again.
- It causes trouble with people using mouse trails, by erasing part of the trail. The person then sees the mouse in a position other than where it is.
- Mouse keys users also have problems.
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182