Affected Versions
This bug affects: IE8
Symptoms
Button-like elements do not get centered when { display: block; margin-left: auto; margin-right: auto; } applied on them and `width` is not explicitly set
Date of the Tutorial
Wed Aug 19 10:22:23 2009
Description
Here's a bug I found on Gérard Talbot's IE8 Bug Collection Page, although, I would like to amend the bug's description and say that this bug only applies to buttons and not all inline replaced elements; i.e. ' element"><button>
and ' element"><input>
of type="button"
and type="submit"
. Furthermore, this is not a bug as far as spec conformance goes, since CSS 2.1 does not define which properties apply to form controls and frames, or how CSS can be used to style them. User agents may apply CSS properties to these elements. Authors are recommended to treat such support as experimental.
http://www.w3.org/TR/CSS21/conform.html#conformance. However, this bug was not present in earlier versions of IE and sane browsers render the buttons centered, so, let's take a look: