Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of '*' in CSS [duplicate]

Tags:

css

Possible Duplicate:
css: the meaning of * mark

What does * do in css? I saw some code here that contained it:

.center-wrapper{
  text-align: center;
}
.center-wrapper * {
  margin: 0 auto;
}

Is this a typo?

like image 874
Soatl Avatar asked Jun 17 '11 13:06

Soatl


People also ask

What does selector mean in CSS?

A CSS selector is the first part of a CSS Rule. It is a pattern of elements and other terms that tell the browser which HTML elements should be selected to have the CSS property values inside the rule applied to them.

What does * selector do in CSS?

The CSS Universal Selector The universal selector (*) selects all HTML elements on the page.

What is the purpose of * In selector?

Basic selectors Example: * will match all the elements of the document. Selects all elements that have the given node name. Example: input will match any <input> element. Selects all elements that have the given class attribute.

What does *{ mean in CSS?

* means all elements. For example: div *{ background-color:red; }


1 Answers

  • means everthing: every tag/element in document.

In this case .center-wrapper * everything under every element with center-wrapper class.

like image 125
Topera Avatar answered Sep 17 '22 16:09

Topera