Answer the question
In order to leave comments, you need to log in
How to determine if an element has overflow without JS?
There is a block with an indent on the right, sometimes in the content block there is more than it can accommodate and a vertical scrollbar appears, respectively - the width of the block decreases.
Is it possible not to use js at all, but using webkit (a task exclusively for Chrome) to determine the presence of a scrollbar in order to adjust the indent?
Answer the question
In order to leave comments, you need to log in
If purely for chrome, this "crutch" is suitable
the method works if it is known in advance what width the block should be. The right padding is set to the inner block width, the value is the difference between the block width (in absolute value) and the required padding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question