Hi guys,I will like you to take a look at this:
Why is the here grey,I didn’t code the here to turn grey.
Please see:https://codepen.io/adaezebaby/pen/MWeJpOO
Hi guys,I will like you to take a look at this:
Hello there,
You did code for it to be grey:
a:hover {
background-color: grey;
color: ;
}
HTML
<a href="https://codepen.io/adaezebaby/pen/dyXWaMr">
<button>here</button>
</a>
Does that clarify?
Also, somethings about the code:
html/head/body tags. CodePen does this automatically. If you need to put anything within the head of your HTML, use the
icon, then add what you need to, to the relevant location:body and html tags does not make sense, and can lead to unexpected results:</body>
</html>
<h3>
View more drawing <a href="https://codepen.io/adaezebaby/pen/dyXWaMr"><button>here</button></a>
Hope this helps
How do I put it in a way that the grey wouldn’t affect the:
<button>here</button>
An issue is, it is an anti-pattern to use both an a element and a button element. You should decide on one.
a element.button element.As for the CSS, make use of CSS selectors:
id and select is in CSS with #the-id { color: blue; }
class (typically, only when there is going to be more than 1 of this element), and select with: .class-name { color: green; }
<style>
a {
color: blue;
}
p > a {
color: green;
}
</style>
<body>
<a> Some random link</a>
<p> Some text with <a>a link I want green</a>, and to have the default styling</p>
</body>
Hope this helps
Thanks very much I will surely do some research and get back to you in a moment
.