0

I have some title absolutly positioned over an image and for some articles it gets too big and overflows, which looks ugly.

I wonder if it is possible to use @media(max-height:200px) that usually refers to the viewport, to refer to an element, and change its style when the box gets too big.

My first thought was "this is not possible", but seems to be always a way to do stuff when you ask to the right person.

EDIT: For a more concrete understanding: I have an h2 with font-size: 2em, and I'd like to make it 1.5em, if the text is longer than 2 lines.

Vandervals
  • 5,774
  • 6
  • 48
  • 94

0 Answers0