2

I have an div with some random text (JSFiddle).

The height of container is 397px. Half of container height is 198.5px. How to count the symbols of 198.5px of container with jquery, is it possible?

Mathlight
  • 6,436
  • 17
  • 62
  • 107
  • I'd suggest you split it into two different `` or `
    `s for simplicity, but someone creative could probably find a way.
    – Huey Jul 01 '15 at 11:49
  • you can not divide px ... its the base unit and +int – NullPoiиteя Jul 01 '15 at 11:51
  • 1
    What are you trying to accomplish? Perhaps there is a better way around it. The problem you are describing is quite difficult, since there are many variables: font size, line height, screen pixel density etc. Catching all the edge cases is quite labor intensive project. – Marko Gresak Jul 01 '15 at 11:54
  • Sounds like typical XY problem: http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem – A. Wolff Jul 01 '15 at 11:59

0 Answers0