Closed Bug 75529 Opened 23 years ago Closed 23 years ago

There is extra space at the bottom of a button element when DOCTYPE used.

Categories

(Core :: Layout, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 22274

People

(Reporter: linuzonix, Assigned: karnaze)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
BuildID:    20010410

There is extra space at the bottom of a button element. IE shows this 
correctly. Check the above URL with IE and Mozilla. 

Reproducible: Always
Steps to Reproduce:
check out the url
Isn't this just how the default style sheet is defined?  It automatically gives
a margin-bottom to <button> elements?

I believe the reasoning behind this is so that something like
<button>button</button><br>text text text
would leave a small space between the button and text, not cramming them against
each other.

If the appearance is such an issue then it's quite easy for the page author to
override the space with a style declaration:
button {margin:0px;}


Sorry, I spoke too soon.  Changing the margin property has no effect.

There should be a way to control this via styles, no?
The doctype used is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">,
thus triggering strict layout mode (--> CSS2 box layout model). See
http://www.hut.fi/u/hsivonen/doctype.html
http://www.hut.fi/u/hsivonen/standards.html#lineboxmodel
Could this be related to this bug report?
Adding this to the <head> of the example document fixes the problem for me:

<style>
button { vertical-align: bottom }
</style>

Reporter, please confirm and resolve this bug (e.g as invalid or worksforme).
Nice pickup Andreas.

Marking this as WFM because mozilla is doing the right thing by placing the
button on the baseline.

Reporter: if you add the style rule or take out the DTD you will get mozilla to
render this in the quirky mode similar to IE.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
this is not actually a worksforme but a dup of an invalid bug. reopening.

Reporter, the space in strict mode is there for descenders.  display:block or
vertical-align:bottom on the button will get rid of it.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
marking duplicate

*** This bug has been marked as a duplicate of 22274 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago23 years ago
QA Contact: petersen → ian
Resolution: --- → DUPLICATE
verf for bug dupe.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.