Css selector

recently i had seen what is the meaning of this.

.classname *{


ex: .noborder *{

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 *{

<div><h1>some title</h1>
    <form method="" name="" class="noborder">
       <label><input type="text" id="one"></label>
       <select name="selection">


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.

1 Like

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 :slight_smile:

Thanks for clarification.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.