Connecting Tech Pros Worldwide Help | Site Map

Opera 9.5 bug, nested absolute positioning broken

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 30th, 2008, 04:25 AM
Nik Coughlin
Guest
 
Posts: n/a
Default Opera 9.5 bug, nested absolute positioning broken

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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.