+ 1
Why link color is not setting to white?
Here is code. In the code, white color is mentioned in the a:link, but it's not working. https://code.sololearn.com/W812b2GeEEyH/?ref=app
15 Answers
+ 5
Himanshu Rai By default, the 'a' tag has some text decorations. Like it has underline, it has color as blue and cursor as pointer. By setting text decoration none, you remove the default text decoration. And hence, then you can style it as your own needs!
+ 2
Hey, add these lines of CSS :
a {
text-decoration: none;
color: #fff;
}
+ 2
Add
a:visited{
/*CSS Rules here*/
}
This will be the styles applied to each link that has been clicked on.
+ 2
hi, if you want you can look up how hex codes work. a hex code controls the color. #FFFFFF is white #000000 is black. the first two digits represent the amount of red in the color and so on... its a bit confusing but there is a system to it
+ 1
It's worked! So it means that for only a:link, the color property is defined separately? What is the reason behind this behaviour?
Thanks for responding
+ 1
So can be directly mention text-decoration:none inside a:link ?
+ 1
It is pseudo selector, that styles different states of link. So, how can be it wrong?
+ 1
Actually, by 'wrog' I wanted mean 'in this case' it shouldnât be used. You are trying to make the color of link to white right?
:link pseudo class will only style the a tag which hasnât been visited. Is that what you want?
0
đ
0
Actually, you are using it wrong :))
Wrong :
a:link{
background-color: red;
color:white;
padding: 14px 25px;
}
Correct :
a {
background-color: red;
color:white;
padding: 14px 25px;
text-decoration: none;
}
It is not 'a:link'. It's only 'a'. You should learn css selectors bro :))
0
Yes.
0
So, it should work on unvisited link and display the link color white. But it's not working bro
0
Thanks guys for helping me!đđ
0
ŰȘŰŻ Ű°Ű±Ù Űč Ùۧ