Closed
Bug 60836
Opened 26 years ago
Closed 26 years ago
margin-top with a percentage does not work, and breaks font sizing
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: ostermer, Assigned: pierre)
References
()
Details
The code in question is a snippit of CSS1 code, applied to an <h1> tag
(the "Got Wang?" that should be in the middle of the page). The style looks
like:
h1.mainwang {
margin-top: 25%;
font: 46pt bold sans-serif;
}
The expected layout is that the heading be approximately a quarter of the way
down the window (the <body> element is the container, here), with a font size
of 46pt. The actual layout ignores the margin specification, and sizes the
font to what looks to be 16pt or so.
To see what the size of the font *should* be, look at the top-left corner of
http://www.gotwang.net/main.php3. That is using the style:
h1.wang {
font: 46pt bold sans-serif;
margin-bottom: 0px;
}
And appears to work properly. It's nested in a <td> element, though, not the
<body> element, so that may play a part.
I've tested this using Netscape 6.0 under Windows 2000 Pro, but I also have a
friend who confirms the incorrect layout using the latest (11/20/2000) nightly
build under linux.
--
Todd Ostermeier <ostermer@daishar.com>
Comment 1•26 years ago
|
||
This bug is invalid. From your stylesheet:
div.menu {
text-transform: capitalize;
font-size: 10pt;
letter-spacing: 10px;
};
h1.mainwang {
margin-top: 25%;
font: 46pt bold sans-serif;
}
Note the semicolon after the div.menu block. That should not be there. It is
(correctly) parsed as part of the next selector, which then becomes "; h1.wang"
and is discarded per the CSS1 rules for discarding invalid selectors. I've
tried removing that semicolon, and it looks to me like that fixes your problem.
Thanks for using Mozilla and reporting bugs!
Status: UNCONFIRMED → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•