Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 26th, 2011, 10:56 AM
Authorized User
Points: 445, Level: 7
Points: 445, Level: 7 Points: 445, Level: 7 Points: 445, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old February 27th, 2011, 02:54 AM
Authorized User
Points: 448, Level: 7
Points: 448, Level: 7 Points: 448, Level: 7 Points: 448, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2011
Posts: 85
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
Reply With Quote
  #3 (permalink)  
Old February 27th, 2011, 06:28 AM
Authorized User
Points: 445, Level: 7
Points: 445, Level: 7 Points: 445, Level: 7 Points: 445, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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...
Reply With Quote
  #4 (permalink)  
Old February 27th, 2011, 07:55 AM
Authorized User
Points: 448, Level: 7
Points: 448, Level: 7 Points: 448, Level: 7 Points: 448, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2011
Posts: 85
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.
Reply With Quote
  #5 (permalink)  
Old February 27th, 2011, 09:03 AM
Authorized User
Points: 445, Level: 7
Points: 445, Level: 7 Points: 445, Level: 7 Points: 445, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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">
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 04:01 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.