0

I want to do the following:

I have a long text, and i want to rip a part of him and add ..., that's not a problem, but i need to do this responsive, meaning:

If i have a width of 720px, i want this text to break after 30 char:

"Question 1: This is the greatest site ever to be red...",

Now when i reduce the width of the page i want the breaking point to be a bit early:

"Question 1: This is ...",

Should i achieve this using a filter, or filter is not the best strategy?

2
  • 1
    achieving this with css only would be better. Commented Aug 25, 2014 at 11:33
  • How exactly should i implement this? Commented Aug 25, 2014 at 11:34

1 Answer 1

1

In your CSS:

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

No need for filters here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.