Closed
Bug 3116
Opened 26 years ago
Closed 25 years ago
ex and em units are way off
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: dbaron, Assigned: peterl-retired)
References
()
Details
The ex and em units don't seem to be resizing themselves to the font size of the parent on these pages. All the images show up the same height.
Reporter | ||
Comment 1•26 years ago
|
||
The ex unit test is at http://www.fas.harvard.edu/~dbaron/csstest/exunit.html The em unit test is above.
Assignee: troy → peterl
Status: ASSIGNED → NEW
Component: Layout → Style System
Peter, this looks like a style system problem. Just looking at this much smaller case, when I get the style info for the image I'm told its height is only 170 twips. That's why we end up with such a small image <html lang="en-US"> <head> <base href="http://www.fas.harvard.edu/~dbaron/csstest/"> <style type="text/css"> IMG { height: 1em; vertical-align: bottom; } SPAN.hl { line-height: 1em; background-color: yellow; vertical-align: bottom; } .one { font-size: 50px; font-family: Verdana, Arial, sans-serif; } </style> </head> <body> <p class="one"> <span class="hl">M</span><img src="sq_small.jpg" alt="[Squirrel Image]"><span class="hl">M</span> </p> </body></html>
Reporter | ||
Comment 3•26 years ago
|
||
The problem has to do with inheritance of the font-size property. If I stick an explicit "font-size: inherit" on the image, things are OK. Once the inheritance is fixed, you should probably reassign the bug to someone else, because the sizing is still a little bit off with inherit put in (although it could be line-height that has the size error).
Reporter | ||
Comment 4•26 years ago
|
||
The cause of the inheritance problem is the font-size: 8.5pt in ua.css, which you use to set the size of the ALT text. ALT text should probably be the same size as regular text. In fact, it should not be constrained to the image size. See bug 1994. If you insist on doing ALT text the way you do now, you probably need an internal pseudo-element for it. This bug prevents the use of em/ex units on images without font-size: inherit, which is a serious problem. It's something that you probably will find on the web already.
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•25 years ago
|
||
Changed alt text sizing rule in ua.css (now only applies font size to text within images, not the image itself). The images are now the right size, but they still don't line up with the text backgrounds. That's a seperate issue.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 6•25 years ago
|
||
Verified fixed.
You need to log in
before you can comment on or make changes to this bug.
Description
•