What is the usefulness of these 2 things in CSS reset?
What is the problem in resizing of input elements in IE and in which version?
and if legend color doesn't inherit in IE then how it can be solved adding color:#000;
/*to enable resizing for IE*/
input,
textarea,
select {
*font-size:100%;
}
/*because legend doesn't inherit in IE */
legend {
color:#000;
}
The first rule actually doesn't apply on IE only, but on all webbrowsers. Normally you would like to define a global font in the
body
:But this doesn't get applied (inherited) on the form controls in all webbrowsers. That rule would then apply (only) the font size on them as well. One way is to set the
font
toinherit
on those elements:But that doesn't work in IE6/7. Another way is to just explicitly include the elements in the rule:
That only the
font-size
is been set is probably because the YUI guys would like to keep the form controls their own browser-default font family (which issans-serif
forinput
andselect
and ismonospace
fortextarea
). The100%
is been used because IE6/7 doesn't supportinherit
.As to the second rule: I am not sure what they meant here. I did a little test in IE6/7. The
legend
just inherits the color from its parent element. Maybe the actual problem lies somewhere else?