MARCELO Posted March 6, 2018 Share Posted March 6, 2018 I m using nth-child in the example below. But i just cant change the font-size and padding for a specific item of the menu. However, i can make some other changes i wanted to. Why does it happen? https://www.w3schools.com/code/tryit.asp?filename=FP4GEVEWQ0O2 Thanks. Link to comment Share on other sites More sharing options...
dsonesuk Posted March 6, 2018 Share Posted March 6, 2018 You set the default styling first .navbar a {....} Then you set the styling to change the default below to override the default styling, as the style sheet is read from top to bottom. example: .navbar a {color: red;] .navbar a {color: white;] .navbar a {color:blue;] The nav bar links will be blue as the last navbar a link colour overrides all the previous colour styles. Link to comment Share on other sites More sharing options...
MARCELO Posted March 6, 2018 Author Share Posted March 6, 2018 Now i got it. Thanks! 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