Change color of link on a div class button hover
-
I created a div class “dkbutton” to match the more link CSS. The one thing I cannot match is how when hovering over the button, the link color changes from blue to white.
- Go to https://manifest828.com/
Scroll down page a little to find post titled “Melissa Roxburgh on ‘Manifest’, the Rich Mythology, and Nagging the Producers for Answers”. Here you will see one of the “dkbuttons”
Compare that, now, to the read more button on the post just below it.
I want to be able to see “READ ARTICLE” when the cursor hovers over it. So it needs to change to white (so it can be read against the back bkg.
I would appreciate anyone who could help me with this.
The blog I need help with is: (visible only to logged in users)
-
Hi there,
It looks like the structure of your created button is actually a little different then that of the other buttons.
Yours is a link within a div and the div is styled to look like the other buttons: http://prntscr.com/l1dz88
The other buttons are just links styled into buttons: http://prntscr.com/l1dysx
In your case when you apply a
:hovereffect to the div it actually has no effect on the text within because the text is with in the link and when you apply the:hovereffect to the link itself it only goes into effect when hovering over the text itself, not the div – creating kind of a glitchy effect.My suggestion would be restructuring your newly made button to be more inline with the other buttons (only a link) and giving the link a class of your choosing and styling it how you have styled the div. Then we can apply the
:hoverto the entire section and be able to access styling the text as well.Let me know if that makes sense to you, if you have any further question or need any clarification at all – just let us know.
Cheers
-
thankyou. you’re directions were very clear, and I was able to make all the changes and fix the problem. I learned something, too.
-
- The topic ‘Change color of link on a div class button hover’ is closed to new replies.