I want to display a button that accepts all the spaces of its parent, which in itself is absolute.
But it looks like Firefox has an error (everything works fine in Chrome and Safari (Webkits), I can not test IE because I am on a mac (if anyone can test and say in the comment if it starts or not, It would be very nice)).
Purpose:

The div and button together contain a wrapper, which is an absolute position.
HTML code:
<!DOCTYPE html> <html> <head> <style type="text/css"> .wrapper { background-color: red; position: absolute; width: 100px; height: 100px; } .inner { background-color: blue; position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; } </style> </head> <body> <div class="wrapper" style="top: 50px; left: 50px;"> <div class="inner">div</div> </div> <div class="wrapper" style="top: 50px; left: 200px;"> <button class="inner">button</button> </div> </body> </html>
It is pretty simple. The problem is that in Firefox it looks like this:

Do you have any idea why Firefox makes this code the same as yours and do you have a workaround using similar positioning?
EDIT: I can't (and don't want to) set the width and height of the inner child. The reason is that I use GWT with layout mechanisms. The GWT layout uses bottom / top / left / right elements for position and size, so I cannot change this behavior. Everything works with a classic div. The problem is only with the button.
html css cross-browser firefox
Jerome Cance
source share