I’m creating a navigation bar and its made using an unordered list. I want to override my style for the first one so it looks different. I tried changing its class, but the actual style overrides it. Thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the style declarations, use
!important, like this:Make sure you put the
!importantlast. Is there a way you can factor the attributes out of thestyleattribute and into a class? That would be a cleaner and less tedious way of doing it, as!importantmust come after every declaration.See this link for more information on CSS cascading rules.