element inside of a div is not the full height.

RESOLVED INVALID

Status

()

Core
Layout: Block and Inline
RESOLVED INVALID
15 years ago
10 years ago

People

(Reporter: Justin A, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686) Gecko/20030527 Galeon/1.3.5 Debian/1.3.5.20030615-1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030527 Galeon/1.3.5 Debian/1.3.5.20030615-1

if you try to change the background color of a link inside of a div, the links
backgrounds height is not the height of the div.

Reproducible: Always

Steps to Reproduce:
div#header {
        background: red;
        color:black;
        border: 1px solid blue;
        padding:0;
        margin:0;
}
div#header a {
        background: green;
        color:black;
        text-decoration:none;
        border: 1px solid orange;
        font-size: 320%;
        padding:0;
        margin:0;

}
...
<div id="header">
<a href="">hi there</a>
</div>

Actual Results:  
in 1.4rc3 the links background is not the full height
it looks like this
+------+-----------------------------
+------+
| link |
+------+
+------+-----------------------------

Expected Results:  
in 1.3.1 and FB 0.6(?) it is fine.
+------+-----------------------------
|      | 
| link |
|      |
+------+-----------------------------

I'm not sure which is wrong and which is right, but it looks completely
different in different mozilla versions.

the line-height:1em fixes it in some versions of mozilla, and makes it worse in
others, but I'm told this should not be needed.
(Reporter)

Comment 1

15 years ago
Build Identifier should be Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4)
Gecko/20030624

oops :)

Comment 2

15 years ago
This is what should be happening.

<A> is an inline element, so the background color affects the background of the
<A> tag's inline box.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID

Comment 3

15 years ago
Reopening.  Missed where you said it wasn't working in FB.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(Reporter)

Comment 4

15 years ago
made another image
http://s.bouncybouncy.net/~justin/csstest4.png that is of the csstest3.html

should be better than the ascii art...
basically mozilla 1.3.5 and 1.4b(fb 0.6) display it one way and mozilla
1.4rc3(and khtml for that matter) display it another...

so from what I understand in the picture mozilla 1.4rc3 (and khtml) is the only
one that is doing it correctly?
Is one of your builds an Xft build and one not?  The results may vary based on
what fonts you have (I think).

Comment 6

13 years ago
The a should never be the height of the containing div since the a is an inline
element. Use div#header a { display: block; width: 100%; height: 100%; } to
achieve what you want.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/

Comment 8

10 years ago
I don't think this is a bug, because according to CSS 2.1 UAs have to choose a 'normal' (defined as ]1.0;1.2[) line-height as default, which of course influences the height of the div here.

Besides, this behaviour is consistent across browsers.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.