Closed
Bug 229958
Opened 22 years ago
Closed 22 years ago
Incorrect computation of anchor elements' width if there is a non-zero left padding
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: panahi, Assigned: dbaron)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
If you specify the width and the left-padding in the style of an anchor element,
Mozilla 1.5 adds the specified width and left-padding to compute the actual,
rendered width of the element's box.
Reproducible: Always
Steps to Reproduce:
1. Create an anchor element <a href='...' style'...'>...</a>.
2. Specify its width and left-padding in the style attribute.
3. Make sure that the content (text) is a good bit shorter than the specified width.
(An example is given in the Additional Information field.)
Actual Results:
The actual, rendered width of the anchor element is the specified width PLUS the
specified left-padding.
Expected Results:
The actual, rendered width of the anchor element should be the specified width.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Mozilla 1.5 Bug</title>
<style>
.myBox
{ position: absolute
; top: 100px
; left: 100px
; width: 130px
}
</style>
</head>
<body style="background-color: white; font-family: Verdana, sans-serif;
font-size: 7pt">
<div class="myBox" style="border: 1px solid red"> </div>
<a href="http://www.cnn.com/"
class="myBox"
style="border: 1px solid lightskyblue; text-decoration: none; padding-left: 15px"
onMouseOver="javascript: this.style.backgroundColor='lightskyblue'"
onMouseOut ="javascript: this.style.backgroundColor='transparent'"
>http://www.cnn.com</a>
</body>
</html>
Comment 1•22 years ago
|
||
> The actual, rendered width of the anchor element should be the specified width.
No, it should not. Please see the CSS spec's definition of the "width" property
and give http://www.tantek.com/CSS/Examples/boxmodelhack.html (a page by the
technical lead of the MacIE team) a read.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•