Wouter van der Zee
Wouter van der Zee

Reputation: 47

Unwanted word break in Safari

Text within a button is breaking up in two lines in Safari - but not in Chrome and Firefox, see the screenshots. Using the CSS property break-word: keep-all; doesn't seem to work.

Any suggestions how to solve this?

not good: button safari: not good

good: button chrome: good

CSS code:

.button {
font-size: 1.5em;
padding: 0em 0.6em 0.1em 0.6em;
margin-left: 0%;
margin-right: 0%;
margin-bottom: 24px;
width: auto;
text-decoration:none;
display: inline-block;
border: none;
border-radius: 1em;
background-color: #4ca8da;
background-repeat: no-repeat;
font-family: 'Populaire';
font-weight: normal;
font-style: normal;
color: white;
text-align: left; }

Upvotes: 1

Views: 1523

Answers (1)

John
John

Reputation: 3415

white-space: nowrap; should fix it.

Further information.

Upvotes: 3

Related Questions