vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
Its happening because a.hover makes all links to the properties embedded in it on mouse over. To make it's effect limited to particular links we use ID and Classes. Ok...lets again look at two cases for both ID and class:Case I:
<a class="links" href="#">Links</a>
<a class="links" href="#">About Me</a>
a:hover.links
{
background-color:#ff3300;
}
Case II:
<div class="links">
<a href="#">Links</a>
<a href="#">About Me</a>
</div>
.links a:hover
{
background-color:#ff3300;
}
Similarly you could do this for ID by just replacing . by # and giving tags an ID.
vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
This is because with 60% width the page can't show everything on one links so it breaks. But it is possible to make them in one line, everything is possible. Two methods, that's striking right into mind now are:
1. Use tables (that's what i recommend)
2. Use <a href="http://www.w3schools.com/css/pr_class_float.asp">float </a> property and width (I recommend this too because you are learning).
Give it a try and post here in case of any problem.
vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42