skip to Main Content

I did this random quotes project, but I can’t make the text in button appears straight. I don’t know why it is flex.

this text inside the second green box

I want to make it straight

2

Answers


  1. Set button width to min-width: fit-content;

    Login or Signup to reply.
  2. add to css file:

    *{
        box-sizing:border-box
    }
    

    and remove this:

     #button {
    display:flex;
    }
    

    and edit button like this:

        button{
        widht:100%;
        background-color:chartreuse;
        border:solid 0px;
        border-radius:5px;
        margin:0 auto;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search