The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> (HTML) Text Disappears when I hover over a button
Oscar
post Jun 20 2019, 11:35 AM
Post #1





Group: Members
Posts: 1
Joined: 20-June 19
Member No.: 26,912



Hello, I'm having a bit of trouble with some HTML code.
Everything looks and functions fine, except when I hover over the button.

If the cursor is over the text in the button, then the text is visible.

But, if it's not over the text, then the text is invisible.

Any tips on how keep the text visible at all times while hovering over the button?
Here's the code: https://www.w3schools.com/code/tryit.asp?fi...me=G594BTR3OTJK

Thanks,
Oscar
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 20 2019, 01:21 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



It behaves a little differently in different browsers, but some of the styling doesn't work because of errors in HTML and CSS. If you fix the errors it should work in SOME browsers, I think.
https://validator.w3.org/
https://jigsaw.w3.org/css-validator/

Especially the following errors.

You have two style blocks (why?). You haven't closed the first one, there is no end tag for STYLE.

None of the links are correct. In button1 you close the link with a start tag for A instead of an end tag. In button2 there isn't even an attempt to close the link.

But even if you correct the errors you have to rethink this. Because BUTTON can't contain A. In plain English, you can't put a link in a button.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
sarusaytooloud
post Jul 4 2019, 04:18 AM
Post #3





Group: Members
Posts: 1
Joined: 4-July 19
Member No.: 26,924



Thanks, pandy for such an excellent answer..It was helpful for me..Keep up!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 09:21 PM