Row length in text

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
Apr 10, 2006 10:34
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
Apr 10, 2006 10:47
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
Apr 10, 2006 11:32
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
Apr 10, 2006 11:54
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
Apr 11, 2006 11:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.