Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Underline links in widgets when hovering (http://forum.bytesforall.com/showthread.php?t=15573)

JulesG Oct 5, 2011 11:26 AM

Underline links in widgets when hovering
 
Hi,

Using Wordpress 321 and Atrahualpa 367 - ata-round

My work-in-progress Web site is here:
http://julesgobeil.com/wpfr/

Searching has found a few suggestions to underline links when hovering in widgets but they don't seem to work:

Code:

.widget ul li a:hover {
text-decoration: underline !important;
}

Code:

div.widget a:hover {
text-decoration: underline !important!;
}

Any suggestions ?

Thanks
Jules

juggledad Oct 5, 2011 02:40 PM

you have to get an understanding of CSS. If you have two rules that could apply to an element, the more specific will win out, so if you coded
HTML Code:

.widget ul li a:hover {
text-decoration: underline !important;
}

but there is also a
HTML Code:

div.widget ul li a:hover {
text-decoration: none;
}

the second wins out

JulesG Oct 6, 2011 04:16 PM

Thanks for your answer.

Last week, you have shown me that a CSS element that sits on another element will cover the bottom element. The least I could do before posting this question was to check that.

I cannot find any occurrence of "text-decoration: none" attached to hover parameters. All hover CSS has the underline text-decoration.

The links are underlined everywhere when hovering, except in the Categories widget. I spent hours trying to understand why !:confused:

What could be wrong ?

juggledad Oct 6, 2011 06:46 PM

add the following to CSS Inserts
HTML Code:

div.widget a:hover {
        text-decoration: underline;
        }


JulesG Oct 7, 2011 05:54 AM

Many thanks for your help.

As I wrote in my first post, I have already tried your suggestion: the only difference being that I added !important. Unfortunately it doesn't work, with or without !important.

I'm beginning to think something is wrong with my installation. File or line missing, or maybe a curse... :confused:

I care to have all links underlined when hovering because it is important for color blind persons.

Any thoughts ?

Thanks for your help
Jules

juggledad Oct 7, 2011 06:08 AM

did you put it at the end of your CSS Inserts?
I don't see it in the page source.

You have a LOT of additional CSS that looks like it was lifted from somewhere else and it could cause the issue.

JulesG Oct 7, 2011 10:12 AM

Oh ! I removed it because it didn't work.

The extra CSS code after /* +++ TTG +++ */ is used by my header, menu and footer which are imported from my Web site. All 3 work well.

I guess you found the problem. Putting the underline/hover code before this extra CSS code doesn't work. Putting it at the very end doesn't work either but adding !important makes it work.

I did check this extra CSS code before posting for help and it doesn't relate to "widget". Also, the only "text-decoration" references are set to "underline". Tricky isn't !

It was then easy to find where the problem is by moving the underline/hover code up until it stops working.

I still can't believe that the line that causes the problem is this one:

Code:

/* ++++++++++++++++++++ TTG ++++++++++++++++++++++ */
:confused: Even worse, removing this comment line doesn't fix the problem... :confused:

This works:
Code:

/* ++++++++++++++++++++ TTG ++++++++++++++++++++++ */

div.widget a:hover {
        text-decoration: underline !important;
        }

And this doesn't work:
Code:

div.widget a:hover {
        text-decoration: underline !important;
        }

/* ++++++++++++++++++++ TTG ++++++++++++++++++++++ */

And this doesn't work either:

Code:

div.widget a:hover {
        text-decoration: underline !important;
        }

And, changing the comment line to this one /* */ doesn't change anything.

Well, at least it works now ! Many many thanks for your help.
Jules

Problem solved


All times are GMT -6. The time now is 10:49 AM.

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