recently i had seen what is the meaning of this.
.classname *{
}
ex: .noborder *{
-webkit-box-sizing:border-box;
}
recently i had seen what is the meaning of this.
.classname *{
}
ex: .noborder *{
-webkit-box-sizing:border-box;
}
And what’s the question? I’m a bit puzzled right now
what dose it means universal selector after class name.
That the style will be applied to any element that’s a child of some other element with the class .whatever_name_you_write_here
To follow your example:
.noborder *{
-webkit-box-sizing:border-box;
}
<div><h1>some title</h1>
<p>paragraph</p>
<form method="" name="" class="noborder">
<label><input type="text" id="one"></label>
<select name="selection">
<option>1</option>
<option>2</option>
</select>
</form>
</div>
To which elements do you think that the style noborder will be applied?
that is the thing i have to know, so it will apply to the form elements only(including child)
Or more specifically, it applies to any descendant element—children, grandchildren etc. So here, it will apply to all elements inside an element with a class of .classname
.
Exactly. It will apply to the elements LABEL, INPUT, SELECT, OPTION because all of them are under FORM which has the class noborder
@ralphm said it much more nicely than I did
Thanks for clarification.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.