V
V
vasIvas2015-11-05 18:44:07
Sass
vasIvas, 2015-11-05 18:44:07

How do you know if two spans don't fit on the same line?

There are two spans with text, how do I know if their total text exceeds the width I need?
In more detail, that is -

div.span-container>span.first{Text}+span.second{Text}

The span-container has a width. But sometimes the text in the span is larger than allowed and I need to move the second span to a different position. how to find out what text is more?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav IKARUS, 2015-11-05
@vasIvas

Maybe in JS calculate the width? Nothing smarter comes to mind, because personally I don’t know css tools that could do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question