Ganesh Ujwal Posted November 11, 2014 Share Posted November 11, 2014 difference between "nav li:hover" & "nav li:hover a"? Code: nav li:hover { background: #4b545f; background: linear-gradient(top, #4f5964 0%, #5f6975 40%); background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%); background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%); } Code: nav li:hover a { background: #4b545f; background: linear-gradient(top, #4f5964 0%, #5f6975 40%); background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%); background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%); } both are same or not? Link to comment Share on other sites More sharing options...
dsonesuk Posted November 11, 2014 Share Posted November 11, 2014 nav li:hover targets the li on hover and apply styling to it. nav li a:hover targets the a on hover and apply styling to it . IF the li and the anchor within it are of the same dimensions you won't see any difference. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now