user1031947
user1031947

Reputation: 6664

Pure CSS way of determining whether a child element is clipped by a parent?

I have a child element and a parent element.

<div class="parent">
  <div class="child" />
</div>

The child may be positioned outside of the parent or may be partially clipped by the parent. When this happens, I want to set it to display: none.

Is there a pure css way of accomplishing this?

Upvotes: 0

Views: 130

Answers (1)

dezman
dezman

Reputation: 19358

You cannot perform that kind of test with css, it is not possible.

Upvotes: 3

Related Questions