my first problem is that the link wont work for li b
is this something impossible?
I want to move the navbuttons down to align with the logo. Also, I want to change the logo img for every navbutton (see img)
<ul>
<li><a href="home"><img src='images/logo1.jpg' width='550 height='400' onmouseover="this.src='images/logo.jpg';" onmouseout="this.src='images/logo1.jpg';" /></a></li>
<li><b href="music"><img src='images/m.jpg'/></b></li>
<li><b href="news"><img src='images/j.jpg'/></b></li>
<li><b href="contact"><img src="images/s.jpg"/></b></li>
<li><b href="about"><img src="images/g.jpg"/></b></li>
<li><b href="contact"><img src="images/p.jpg"/></b></li>
<li><b href="about"><img src="images/c.jpg"/></b></li>
</ul>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;}
li {
float: left;}
li a {
display: block;
padding: 0px 0px;
text-decoration: none;}
li b {
display: block;
padding: 280px 0px 0px 0px ;
text-decoration: none;}
li b:hover{
Hope someone can help, though i am really noob still
hrefis what's known as an "attribute". Elements (like<a>and<b>) define and support their own attributes, so you can't just use an attribute that "works" with one element and use it on another. That said, some attributes, likeclass, have nearly universal support (meaning they are supported by almost all elements).The short answer to your question is "no"... the
<b>element does not support thehrefattribute.You can, however, wrap most elements in an
<a>tag to turn it into a link, like so:Note that the
hrefattribute must be a URL or URI if you want the link to actually work.homeis not a URL, and thus the link won't work as you'd expect. See MDN's "What is a URL?" for more information.For future reference, check out MDN's HTML element reference. There, you will find a complete list of elements and the attributes they support.