Closed
Bug 105652
Opened 23 years ago
Closed 23 years ago
Small images in absolute positionned <div>. Am I missing something ?
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: boullet.marc, Assigned: attinasi)
Details
Attachments
(5 files)
BuildID 2001101803 NT4 but this is in for centuries.
Consider the following HTML (testcase1.htm in attached zip file) :
<html>
<body bgcolor="lightblue">
<div id="curslayer" style="position:absolute; top:10px; left:10px; z-index:5;
visibility:show;">
<img name="0" src="pot0.gif" alt="cursor" border="0">
</div>
<div id="rulerlayer" style="position:absolute; top:0px; left:10px; z-index:3;
visibility:show;">
<img name="2" src="ruler.gif" alt="ruler" border="0">
</div>
</body>
</html>
pot0.gif is a 11x7 pixels image.
1. Execute this code with moz, IE5.5, NS 4.7
2. See the results in screenshot1.
What I'm expecting with this code is to place the image at the point x=10, y=10.
Mozilla is the only browser to do it right. IE and NS shifts the image down
vertically by 8 pixels (8+ 7 (image height) = 15: remember this number)
3. Place a <!DOCTYPE..STRICT..> line in front of the code (testcase2.htm) and
reexecute.
4. Now all browsers show the same behaviour (i.e. a 8 pixels shift down).
See screenshot2
5. Change the image to be 11x15 pixels (testcase3.htm). Everything become normal
in both quirks and strict mode for all browsers. For all images whose height is
greater or equal to 15, the positionning is correct.
See screenshot3
6. Change the html to have two pot0 images in the <div> (testcase4.htm)
The two images are separated horizontally by 4 pixels (11+4=15). See screenshot4
I must admit that I'm a little bit lost here.
I can image several explanations, none of them satisfying me:
1. Images can't be smaller than 15x15. testcase1 proved the inverse in quirks mode
2.<div> can't be smaller than 15x 15. a default style parameter ?????
3. the right answer from Mozilla experts
Pragmatically, to avoid developers to special case in JS the top and left
parameters, Mozilla quirks mode should behave like other browsers (i.e the same
as its strict mode).
For me, it would be still wrong but once you know that everybody is wrong....
zip file and screenshots coming soon
Reporter | ||
Comment 1•23 years ago
|
||
Reporter | ||
Comment 2•23 years ago
|
||
Reporter | ||
Comment 3•23 years ago
|
||
Reporter | ||
Comment 4•23 years ago
|
||
Reporter | ||
Comment 5•23 years ago
|
||
Reporter | ||
Comment 6•23 years ago
|
||
OK, I read bug 22274.
I think I understand a little bit better the issue.
I add style="display:block;" in testcase2.htm and it works like
expected.
I still see a compatibility issue with other browsers in quirks mode.
Marking this bug as a duplicate of bug 22274 and continuing the discussion
over there
Reporter | ||
Comment 7•23 years ago
|
||
*** This bug has been marked as a duplicate of 22274 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•