Making background highlight for list hover wider

Alright so I have been working on a navigation bar, when I add hover to it the background highlight only goes up and down but wont go beyond the letters. So I tried “line-width” in hopes that it would do the same has “line-height” but got no results. Id appreciate if someone could tell me how to add a wider background highlight.

then you need to change the element to which you added :hover, if you need help with this, you will need to post your code

Nav ul li {
list-style-type: none;
font-size: 1.4em;

nav ul li a {
text-decoration: none;
color: white;
line-height: 2.5em;

nav ul {
margin-left: 15px;
padding: 0px;

nav ul li:hover {
background-color: rgb(100, 100, 100);
color: rgb(255, 255, 255);

ul li {

and the html code?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.