12 years ago
12 years ago


(Reporter: Vadimulik, Unassigned)


Firefox Tracking Flags

(Not tracked)




12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv: Gecko/20070309 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv: Gecko/20070309 Firefox/

<p align="center">
    Centered text
        <input type="button" value="Not centered button ??!!">
    not centered text ??!!

Reproducible: Always

Steps to Reproduce:

Comment 1

12 years ago
The markup you provided is not up to spec for HTML4 or XHTML.  I assume however that you intended it to be HTML4 because it has an unclosed tag and no body/head/title/html tags or DOCTYPE declared.
In the HTML4 spec available at (the version I used was  the current latest revision: there are several components which taken together render your markup invalid HTML4 so Gecko closed the <p> tag when it could no longer be open.  To see the exact markup for the DOM that Gecko used, visit the page with markup from comment 0, hit ctrl-A or cmd-A on Mac, then right click the page background or text and select "View Selection Source".

"Generally, inline elements may contain only data and other inline elements."

The 'p' element section lists <p> as an inline element in the first line of the DTD snippet and states "The P element represents a paragraph. It cannot contain block-level elements (including P itself)."

The 'form' element section lists <form> as a block level element in the first line of the DTD snippet.

The behavior exhibited here is intentional and up to spec.  You should probably be using a DIV element instead here.

See also the HTML validator at
Here is the result of validating your markup through that website:
Component: General → General
Product: Firefox → Core
QA Contact: general → general


12 years ago
Last Resolved: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.