skip to Main Content

I have done this code for navbar with reactjs, but the button class is not working. I tried with basic button styling but it’s not working. I’m new with this so I can’t find the wrong part.

the jsx file->>
This is the jsx file

The css file->>
This is the css file

Final Output->>
Final webpage view

I want to style the button but when I target button class from css it’s not working.

2

Answers


  1. Add the class: "button" to the tag.

    Your designs are going to the div container, and not the actual button

    Login or Signup to reply.
  2. actually you are styling the div, if you want to style the button add the classname to button <button className='button'>Contact</button>

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search