I've been attempting to create a mega menu-like design, but so far, I haven't had much success. Below is the code I've been using for the simplest possible result.
The setup involves two divs - one for an image and another for the menu. The goal is to have the image change when hovering over a link in the menu. I'm open to using either CSS or JavaScript to achieve this effect.
Here is the HTML code:
<div>
<div id="img_div"></div>
<div id="links_div">
<ul>
<li><a href="">Show image 1</a></li>
<li><a href="">Show image 2</a></li>
<li><a href="">Show image 3</a></li>
<li><a href="">Show image 4</a></li>
<li><a href="">Show image 5</a></li>
</ul>
</div>
</div>
And here is the CSS code:
<style>
#img_div{
height: 200px;
width: 200px;
background: url("images/default.jpg");
float: left;
}
#links_div{
float: left;
height: 200px;
width: 200px;
}
ul{
margin: 0;
padding: 0;
list-style-type: none;
}
ul li{
display: block;
}
ul li a{
}
</style>