search

Home  >  Q&A  >  body text

Solve the problem of invalid button class in CSS

<p>I have completed the code for this navigation bar using ReactJS, but the button class does not work. I tried basic button styling but it didn't work. I'm new to this so can't find the wrong part. </p> <p>jsx file->>This is a jsx file</p> <p>css file->>This is the css file</p> <p>Final Output->>Final Web View</p> <p>I want to add styles to the buttons but when I select the button class from css it doesn't work. </p>
P粉111641966P粉111641966461 days ago531

reply all(2)I'll reply

  • P粉334721359

    P粉3347213592023-08-14 13:57:06

    Add the class attribute to the <button> tag, and the class attribute value is "button".

    Your design should be applied to the button itself, not the div container.

    reply
    0
  • P粉457445858

    P粉4574458582023-08-14 10:06:30

    Actually you are styling a div, if you want to style a button add the class name to the button<button className='button'>contact</button>

    reply
    0
  • Cancelreply