I would like to have a title element with overflow-x:hidden and overflow-y:visible. However, for some reason the overflow-y property does not seem to be obeyed. You can observe this here (tested on Chrome and Firefox):
http://jsfiddle.net/YgsAw/3/
In that demo, I expect to see “jjjjj”, but instead the j’s are cut off and look more like 1’s.
If I set overflow-x:visible on the h1 tag then suddenly the full height of the text is visible, but setting overflow-x:hidden makes it clipped. I would expect this behavior from overflow-y, but that seems to have no effect. Why is this, and what can I do about it?
I found some answers in a previous question. According to the specs:
Furthermore, on this page the author mentions that many browsers impose additional restrictions:
That same page also provides demos for all possible combinations where this effect can be observed.
I am not aware of a viable workaround for my situation.
EDIT
I’m pretty sure I can do what I want by nesting my title tag in another tag:
<div><h1>title</h1></div>. The innerh1hasline-height:normalto make everything vertically visible, as well asoverflow:hiddento make it truncate. The outer element can have a strictly limited height andoverflow:visible. It’s not ideal, but it seems like the best option.