Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

Hovering over links in sidebar - I want WHOLE background to change, not just text.


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Aug 31, 2010, 03:52 PM
in10
 
46 posts · Aug 2010
I'm trying to make it so that when you hover over a link in a sidebar widget, it changes the background of the entire <li> area where that link is as opposed to just the text of that link.

For example, I'm trying to do what they did in the right sidebar ("popular articles") here: http://www.copyblogger.com/

The whole area around the text is highlighted when you hover over a link. In my case, just the text itself is being highlighted when it's hovered over.

How do I make that happen?

I'm currently (and unsuccessfully) doing this:

#right ul li a:hover {
background: #f0f0f0;
}
  #2  
Old Aug 31, 2010, 03:56 PM
lmilesw's Avatar
lmilesw
 
10,053 posts · Jul 2009
Central New York State USA
Could you post a link to your site?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Aug 31, 2010, 09:13 PM
lmilesw's Avatar
lmilesw
 
10,053 posts · Jul 2009
Central New York State USA
Try this instead.
HTML Code:
#right ul li:hover {
background: #f0f0f0;
}
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #4  
Old Sep 1, 2010, 05:37 AM
in10
 
46 posts · Aug 2010
Perfect, thanks!
  #5  
Old Sep 1, 2010, 07:04 AM
in10
 
46 posts · Aug 2010
Actually, one other follow up question if you have another second.

What you recommended made it so that the whole area's background changes when you hover over it. How would I make it so that the whole area is also clickable as part of the link?

Thanks again.
  #6  
Old Sep 1, 2010, 08:55 AM
lmilesw's Avatar
lmilesw
 
10,053 posts · Jul 2009
Central New York State USA
I fiddled with this for a bit stumbled on to a solution. Try taking out the li so the code looks like below. Be sure and have a space after ul.
HTML Code:
#right ul :hover {
background: #f0f0f0;
}
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Sep 1, 2010, 10:33 AM
in10
 
46 posts · Aug 2010
Hmmm, it doesn't seem to work for me.

It just changes the background of the entire list and all of the items on it when any of the links are hovered over (as opposed to just the link that's being hovered over), and it still doesn't make the whole area clickable.

I'll leave it live on my site for a bit if you want to see what I mean.

Again, I appreciate the help big time.
  #8  
Old Sep 1, 2010, 11:09 AM
lmilesw's Avatar
lmilesw
 
10,053 posts · Jul 2009
Central New York State USA
You have to put a space between ul and :hover. you have ul:hover and it needs to be
HTML Code:
ul :hover
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #9  
Old Sep 1, 2010, 12:30 PM
in10
 
46 posts · Aug 2010
Ah, I see what you're saying. The problem however is that I've put it like it should be:

#right ul :hover {
background: #f0f0f0;
}

with the space there in the css inserts box. For some reason, it's getting rid of that space on its own.
  #10  
Old Sep 1, 2010, 01:42 PM
lmilesw's Avatar
lmilesw
 
10,053 posts · Jul 2009
Central New York State USA
I kinda wondered if it would work. I guess the best solution is the first.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #11  
Old Sep 1, 2010, 02:30 PM
in10
 
46 posts · Aug 2010
I hear ya. Thanks again for the help.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't seem to change font in Body, Text and Links SamuelGoh Atahualpa 3 Wordpress theme 3 Feb 10, 2010 04:36 PM
[SOLVED] Change color of title text in sidebar text widget Andante Sidebars & Widgets 3 Feb 1, 2010 06:12 PM
How do I change the home page top menu text and background box colors? bella123 Page & Category Menu Bars 4 Feb 13, 2009 07:07 AM


All times are GMT -6. The time now is 06:34 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.