3
Hello I have a div
which has a certain height and content
<div class='mydiv'>
<p> blabalbalala </p>
<p> blabalbalala </p>
<p> blabalbalala </p>
<p> blabalbalala </p>
</div>
Supposing that this div
have a height
of 100px
, how do I capture only the first 30 px?
What exactly do you want to do? You’re going to use this 30px height for what?
– Erlon Charles
@Erloncharles I want to divide in other Ivs this div with size 100px
– Rod
@Rod What about the content? Wouldn’t it be better to work with an x number of lines?
– Renan Gomes
You can calculate which element is intercepted by the 30px line. And this element must be included or excluded.
– Sergio
@Renan has a div with 100px, I want to capture the 20 px primeirios and add the page:[] content in an array, so this array should contain 5 items
– Rod
The question is interesting, but what everyone here must be wondering is why you need it. It’s very unusual.
– bfavaretto
@bfavaretto is to style these separate Ivs as a A4 page, however I want to know how to manipulate the nodes of that content div
– Rod
And if the 30px falls in the middle of an element, what do you want to do with it?
– bfavaretto
@bfavaretto the idea is to add also with push
– Rod