Reputation: 10111
I am trying to make it so that when you hover your mouse over a "box" it changes the text inside it. However, there seems to be a line break between the checkmark/errormark and the Following or Unfollow. Why?
HTML:
<a class="afp" href="demo.html">
<span class="addfriend2">
<span class="fr1">
<font color="#33FF00">✓</font > Following
</span>
<span class="fr2">
<font color="#FF0000">✗</font> Unfollow
</span>
</span>
</a>
CSS:
.addfriend2 {
border-radius: 15px;
background: #517eca;
padding: 8px;
margin-left: 30px;
text-align: center;
font-size: 14px;
}
a.afp{
text-decoration: none;
color:#000000;
}
a.afp:visited{
text-decoration: none;
color:#000000;
}
a.afp:active{
text-decoration: none;
color:#000000;
}
span.fr2{
display:none;
}
a.afp:hover span.fr1{
display:none;
}
a.afp:hover span.fr2{
display:inline;
}
Upvotes: 0
Views: 385
Reputation: 10111
Strangely enough the problem was fixed when adding the missing semi-colon before Unfollow.
Upvotes: 1