jQTouch icon indicating copy to clipboard operation
jQTouch copied to clipboard

Title and Back Button Text

Open DataZombies opened this issue 13 years ago • 9 comments

The title and back button text are not being truncated correctly

http://img714.imageshack.us/img714/5456/screenshot20111225at115.png

DataZombies avatar Dec 25 '11 16:12 DataZombies

Is it fixed?

If not, please reopen.

thomasyip avatar Dec 19 '12 09:12 thomasyip

Still happening.

Screen Shot 2013-02-07 at 11 50 15 PM

devgeeks avatar Feb 07 '13 12:02 devgeeks

Took a brief look, harder to fix that I first thought. We use overflow-x: visible to show the "arrow" of the back button.

For the title, I think it is the button that being too long.

Try the following css to see if it fix the "title" problem.

#jqt .back {
   max-width: 55px;
}

You might workaround it with an extra <div> and gives it a max-width as well.

thomasyip avatar Feb 07 '13 21:02 thomasyip

The problem is you need overflow: hidden; set for the ellipsis on text-overflow to work. The only way I've been able to do that is by setting a wrapper around your link text.

jordandobson avatar Feb 07 '13 21:02 jordandobson

Yes, @jordandobson, that's what I was trying to say with and extra <div>. You said it better.

thomasyip avatar Feb 07 '13 21:02 thomasyip

setting the max-width of the back button, then wrapping the text of the back button in a <div> and giving that div overflow-x:hidden; text-overflow: ellipsis works a treat.

devgeeks avatar Feb 07 '13 22:02 devgeeks

Perhaps we should automatically do this on an inner element (instead of outer) within jQTouch itself?

Ala: .back > span { max-width: 55px; text-overflow: ellipsis; overflow: hidden }

davidkaneda avatar Feb 08 '13 01:02 davidkaneda

+1

devgeeks avatar Feb 08 '13 08:02 devgeeks

I am wishing for a solution that doesn't requires user (nor JavaScript) to add the wrapper <div> or <span>. :-)

thomasyip avatar Feb 09 '13 03:02 thomasyip