Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 26th, 2011, 11:56 AM
Authorized User
 
Join Date: Jan 2011
Posts: 89
Thanks: 1
Thanked 0 Times in 0 Posts
Default a:hover

I have a content slider that has stopped showing the hover colour on the mouse hover.

My ASPX is:
<li class="ui-tabs-nav-item" id="nav-fragment-2"><a href="#fragment-2"><img src="ContentSlider/Images/image2-small.jpg" alt="" /><span class="Heading">[</span><span class="HeadingLetter">H</span><span class="Heading">ardware]</span></a></li>

My CSS is:
#featured li.ui-tabs-nav-item a:hover{
background:#f2f2f2;
}

- but nothing happens when I hover over this link?? Any help appreciated.
 
Old February 27th, 2011, 03:54 AM
Authorized User
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

Hi,

since you have an #id selector it only works for me if you :
- either omit that #id selector from the css
- or adjust the html so it matches the complete combined selector as follows :
Code:
 
<div id="featured" >
<li class="ui-tabs-nav-item" id="nav-fragment-2"><a href="#fragment-2"><img src="ContentSlider/Images/image2-small.jpg" alt="" /><span class="Heading">[</span><span class="HeadingLetter">H</span><span class="Heading">ardware]</span></a></li>
</div>
I hope this helps
 
Old February 27th, 2011, 07:28 AM
Authorized User
 
Join Date: Jan 2011
Posts: 89
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi disel,

Why would I want to remove the #featured CSS when this is setting the hover instruction? And the code you posted matches what I have, have you changed anything? Is there any reason the hover action isnt working? I cant see anything counteracting it in the CSS...
 
Old February 27th, 2011, 08:55 AM
Authorized User
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

Hi Alex,

in the example html I added a div element with an id="featured"
(in order to match the css selector #featured li.ui-tabs-nav-item a:hover)

The example html you posted only matches the css selector li.ui-tabs-nav-item a:hover

I hope this is clear for you.
 
Old February 27th, 2011, 10:03 AM
Authorized User
 
Join Date: Jan 2011
Posts: 89
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Oh I see, I think this is already the case though because the code is nested in:
<div id="featured" >
<ul class="ui-tabs-nav">





Similar Threads
Thread Thread Starter Forum Replies Last Post
get Front page's hover buttons.... insyirah Dreamweaver (all versions) 1 July 10th, 2006 10:08 AM
a:hover problems Stevie CSS Cascading Style Sheets 4 May 8th, 2005 04:30 PM
a: hover - style... elladi Dreamweaver (all versions) 2 August 3rd, 2004 06:48 AM
Description box, when hover on certain word. iniro Javascript How-To 5 July 29th, 2004 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.