I've just started to code in html and I am working on building a small website.
I made an image navigation bar that highlights whichever image is being hovered over, but to do this i had to make a separate image for each link. The only problem is that when i make the browser small, the images go to different lines.
There has to be a better way to code this, but I have no idea what it is.
Here's the code:
CODE
<div id="navbarbg" style="position:relative; top:170px; text-align:center;"/>
<img src="blank.jpg" width=700px height=50px/>
</div>
<div id="navbar" width=700px style="position:relative; top:120px; text-align:center;"/>
<a href="http://www.google.com">
<img src="home.jpg" border=0 width=100px height=50px
onmouseover="this.src='homeh.jpg'"
onmouseout="this.src='home.jpg'"/></a>
<a href="http://google.com">
<img src="paintings.jpg" border=0 width=100px height=50px
onmouseover="this.src='paintingsh.jpg'"
onmouseout="this.src='paintings.jpg'"/></a>
<a href="http://www.google.com">
<img src="sculpture.jpg" border=0 width=100px height=50px
onmouseover="this.src='sculptureh.jpg'"
onmouseout="this.src='sculpture.jpg'"/></a>
<a href="http://ww.google.com">
<img src="graphics.jpg" border=0 width=100px height=50px
onmouseover="this.src='graphicsh.jpg'"
onmouseout="this.src='graphics.jpg'"/></a>
<a href="http://www.google.com">
<img src="contact.jpg" border=0 width=100px height=50px
onmouseover="this.src='contacth.jpg'"
onmouseout="this.src='contact.jpg'"/></a>
</div>
The first div is just the background for the bar.
Any help would be greatly appreciated.