On CSS how do you set a link text-decoration to none - this is how i did but it not work, any help?


#1

img {
display: block;
height: 100px;
width: 300px;
margin: auto;
}

p {
text-align: center;
font-family: Garamond, serif;
font-size: 18px;
}

div{
height:50px;
width:120px;
border-color:#6495ED;
border-radius:5px;
margin:auto;
text-align:center;
text-decoration:none;
}
link{
text-decoration:none;
font-family:arial;
}


#2

link is a term we use to describe this html element:

<a></a>

in the same way, we use the word paragraph to describe this html element:

<p></p>

and if we want to do something to the paragraph in css we do:

p { property: value; }

we use p not paragraph. same goes for link, what do you think the correct css selector is?


#3

great explanation! I was stuck on the same thing. I tried to add the text decoration to the div{}, once I made an a{} I was able to move on. Thank you


#4

2 posts were split to a new topic: Text-decoration none designing a button