Double-line button in text

Asked

Viewed 201 times

0

I wonder if you can make a button that has 2 pre-separated lines for the text.

For example:

<button>
   <span>cima</span>
   <span>baixo</span>
</button>

He’d give me something like:

bt


It doesn’t have to be that way the code, it was just a theoretical example.

  • 1

    Pq does not use div which is a block element and already breaks the line

1 answer

2


You can use line break by tag <br>. The code would look like this:

<button>
    cima
    <br>
    baixo
</button>
  • Same answer in Soen, basically this is one of the most used solutions But it is also possible to use width to limit the size and break the line and other ways too :) Soen Answer: https://stackoverflow.com/questions/7469088/html-can-i-display-button-text-in-Multiple-Lines

  • Iago, always post the references you sought, if you have. Thus, enriches the content of the answer and also gives credit to the other.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.