0

I want to make it so there's only 350 characters inside the paragraph, regardless of how many characters are put into it, I only want 350 displayed.

How can I do this? The text is just in a div tag in

text.

Cheers

2
  • Duplicate of the question that you asked two hours ago.
    – Guffa
    Nov 8, 2009 at 18:19
  • It's similar, but it's a different thing. That was to do with my ASP control panel, this site is written in XHTML/CSS.
    – Smith
    Nov 8, 2009 at 18:24

2 Answers 2

1

You could put the text into a textbox, style away the fact that it's in a textbox and then limit the length on the textbox using the size attribute.

However, the ideal solution would be to limit it on the server side.

1
  • don't forget to disable the text box so people can't edit the contents!
    – JasonWyatt
    Nov 9, 2009 at 0:20
0

You can also inspect the contents via the DOM in JavaScript if you feel like a client-side solution.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.