V
V
vasIvas2016-01-22 18:20:06
Sass
vasIvas, 2016-01-22 18:20:06

How to set the "a" tags horizontally, set the specified width and if it is exceeded, then cut to the tag and then set dots at the end?

I have an array with the words ['some text', 'some text', 'some text', 'some text'] which I need to wrap in a some text tag and position them horizontally. Set this line to a certain length, the path will be 100px and if the words are out of bounds, then cut them off in a different way - 'some text so...' but like this 'some text ...'.
Is it possible to do this in css?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kravchenko, 2016-01-22
@vasIvas

codepen.io/imdmitrykravchenko/pen/bELEvo

N
Nikolai Shabalin, 2016-01-22
@nikolayshabalin

Impossible. CSS doesn't know anything about the length of your "some text", so it doesn't know how to trim your string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question