Sent by Big John on 28 February 2005 23:11
Chris Akins wrote:
> > .popMenu ul, .popMenu li a {
> > height: 1%;
> > }
>
> What are we actually doing in the code above? I understand that the height
> is being set, that's not the question. The question is where did the 1%
> come from, and how would I know to pick that over some other value?
>
> And why is the height applied to both the <a> and the <ul>? The <a> I get,
> but the <ul> I don't.
It's the Holly hack, and it seems to provide "layout" to a box
in IE, which sometimes radically alters how it behaves. Usually
it fixes bugs, but sometimes has other effects. Any small height
value will do the trick without harm, but it needs to be hidden
from non-IE/win, because only that browser will wrongly expand
the small height to what the content requires. The others may
keep the box short and let the content spill out. It's the height
(or width) declaration that causes the layout to occur.
> > .popMenu li {
> > margin-left: -16px;
> > mar\gin-left: 0;
> > }
> Similarly above, I understand what the declarations do on the surface, but
> not where the numbers come in. Where did the -16px come from?
> I understand the "mar\gin-left" is some kind of hack to feed it to one
> browser or something, but which browser is it for and how does one figure
> out which characters to throw into the middle of the word, not to mention
> WHERE in the word that character is put.
When the Holly hack is used in this instance, IE does funny
things with list items, whick seem to have a 16px zone for
bullet placement. The HH fixes one bug, but causes preIE6
versions to create their zones, disarranging the layout.
IE6 does not need this -16px left margin, so by using the
escape inside the property name the old IE's are blinded.
The escape must be inside the name, and it must not preceed
any of the first 6 alphabetical characters, but anything else
is okay. I chose to put it before "g".
> What part of the problem is the "vertical-align: bottom" in the popMenu li a
> rule addressing? That's the one part of the new CSS I don't really
> understand. Again, not what vertical-align does, but how it's being applied
> here.
Only IE5 needs this. The blocked links ought not need aligning,
but IE5 is so retarded that it still thinks the link is partially
"inline". Typical.
In fact, you don't need the li {vertical-align: middle;} at all,
but it's harmless so I left it in.
John
=====
--
Perennial student + Impractical joker + CSS junkie = Big John
<http://www.positioniseverything.net>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/