Could the proportions of the image be contributing to the issue at hand?
#menu {
background: black;
width: 100%;
height: 45px;
}
#menu ul {
text-decoration: none;
list-style-type: none;
}
#menu li {
text-decoration: none;
display: inline;
font-size: 30px;
padding-left: 30px;
}
#menu a:hover {
background-image: url(images/hover.png);
}
#menu a {
text-decoration: none;
color: white;
margin: auto
background-repeat: no-repeat;
background-position: top center;
background-size: contain;
}
When hovering, the image repeats multiple times. The image is 2000 x 500 px. How can I ensure that the image is displayed behind the centered word and not repeated? Thank you.
This is the image hover link
The HTML code:
<div id="menu">
<ul>
<li><a href="index.html"> Home</a></li>
<li> <a href="#"> lalal</a></li>
</ul>
</div>