Jquery mobile text text

I want the text in my button to automatically break the line when it reaches the end of the button. When I have the usual jquery mobile style, it cuts off my text and places three dots, like here: here

I found a small desktop that these dots do not appear, like here (white-space: normal does not work for me) here

have an idea how can i do this automatically line breaks?

+1
source share
1 answer

You cannot align one word in <CSS3, but in CSS3 a new css keyword has appeared called word-break, which allows you. Obviously this only works in CSS3 browsers.

Give your button a css class if you want this to apply to only one button, for example:

<a data-role="button" class='myButton'>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</a> 

Then create a css style like this:

 .myButton { word-wrap: break-word !important; white-space: normal !important; } 

Then the word will be collapsed to the specified width of the button.

Here's an updated jsFiddle example .

+7
source

All Articles