Hi!
We have a customer that wants the length of rows in runningtext(mainbody) to be no longer than 60 characters, does anybody know of an easy and quick way to accomplish this?
//Mats
You mean that you want the text to break at 60 characters?
This is not exactly aligned with the purpose of html and especially not with accessability standards. But, there is of course a good reason to why the customer wants to do this.
CSS will only help you with the visual (read up on the em measurement). Guess you'll have to count characters, up to 60, and then count backwards to the closest whitespace.
If you state your intent, you might get alternative - better - answers :-)
/Steve
Yes, that's what was what I was trying to communaicate :), the customer wants the textrown to be no longer than 60 chars, including whitepaces, and then break into a new line, all this for onscreen readability.
Thanks for the answer, I'll look into this and se if it's something that will work for our customer.
//Mats
With "onscreen readability" you're hopefully talking about something else than just displaying text on a web page, as limiting the width then would just be a case of setting the width of the containter (the div tag for an example) to something that would approximately be 60 characters (again, see if measuring in em's will do the trick).
As a rule of thumb, stay away from altering the text if you can. Use css for anything that is layout or design, and leave the text as it is.
/Steve
Totally agree with you Steve!
NEVER EVER modify data in any way to accomplish a layout.
Because tomorrow you might want to publish your data in some other context, example on a mobile device. And if you've changed the data to fit in one context you have a BIG job fixing it for the new context.
Use the stylesheet to create the desired width for the context your working with.
/HAXEN