Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Opera 9.5 bug, nested absolute positioning broken

28 views
Skip to first unread message

Nik Coughlin

unread,
Jun 30, 2008, 12:22:38 AM6/30/08
to
If you have an absolutely positioned element and you place an absolutely
positioned child element within it and give the child values for both top
and bottom the child will have zero height (expected behavior is has same
height as parent less top + bottom):

http://nrkn.com/opera9Bug/min/

How to reproduce:

Create a block element with position relative. Let's call it grandparent.
Put some text in it so that it has non-zero height

Create a block element inside grandparent with position absolute. Let's
call it parent.
Set parent to have top: 0; bottom: 0; left: 0; right: 0;*

Create a block element inside parent with position absolute. Let's call it
child.
Set child to have top: 0; bottom: 0; width: 1em; border: 1px dotted red;

In Opera 9.5 child has zero height. In all other browsers tested** child
has the same height as parent less top + bottom, which in this case as top
and bottom are 0 means the same height as parent.

*or width: 100%; height: 100%; or probably anything else for that matter
**IE7, IE8, FF2, FF3, Safari, Opera 9.27

0 new messages