Css: the Meaning of * Mark

css: the meaning of * mark

* matches everything. That particular snippet is setting the default padding for everything to 0,0,0,0 and the default margins to 0, auto (that is, vertical margins are 0, horizontal margins are "auto").

Meaning of '*' in CSS

* means ALL.

In this case it would be ALL the elements in .center-wrapper

What is the meaning of * in CSS statements and when to use it?

In the first selector

.reveal * { ... }

the style applies to all decendents of the element with class="reveal", but not that element itself. If you leave out * and write instead:

.reveal { ... }

the style applies to the .reveal element as well.

The second selector in your question is equivalent to

.reveal .handle { ... }

In this case, you can leave out * because there's another selector, and * is redundant.

CSS3 and html5 the meaning of * special character

  • this refers to all the elements and this particular code will make all the element's margin and padding as 0

How do you read !important in CSS?

an "!important" declaration (the delimiter token "!" and keyword
"important" follow the declaration) takes precedence over a normal
declaration.

http://www.w3.org/TR/CSS2/cascade.html#important-rules

Basically, where two style rules are the same... it gives the one marked !important greater importance and will apply those styles.

Example

div{
opacity:0 !important;
}

div.jason{
opacity:1;
}

The first rule would be applied even though the second rule is more specific (one element + one class as opposed to one element)

Note: IE6 ignores !important when you have two of the same property and one of them is important - it'll always apply the last declaration, whether or not it was marked important. **Added from @BoltClock's comment below.

Warning: !important is a hammer that should only be used when absolutely necessary. Almost always, it is better to use more specific selectors to achieve greater specificity and have your styles applied the way you want. !important can make it very difficult for future developers to find and make changes to your code.

One good use case: !important is great for user-defined styles, where a user wants to manipulate Web site pages in specific way in his browser (say make all the backgrounds black and the text yellow). Without having to worry about specificity, the user can add styles to certain elements (like body) and make the styles render.

CSS: What does the question mark at the end of css do?

That's actually not part of CSS itself, but rather, part of the querystring to the image.

It's the same as:

http://foo/images/external.png?bar=baz

The site will take that querystring parameter and value as part of the request. It could make a decision on which file to serve, based on the value supplied.

Likely it's a version number. It helps get around the situations where your browser may have cached the image.

When to use strong , em or mark ?

I keep finding myself asking whether I want the text bolded, italic or yellow high-lighted, which makes me think I should be using CSS instead.

That's 100% correct. Markup is for describing content, not appearance. That being said:

http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html

  • The <strong> element represents strong importance for its contents. Changing the importance of a piece of text with the strong element does not change the meaning of the sentence.

  • The <em> element represents stress emphasis of its contents. The placement of stress emphasis changes the meaning of the sentence.

  • The <mark> element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context.

<mark> doesn't really have relevance to content, only context (e.g. marking content that matches a search term, misspelled words, selected content in a web app, etc.).

<strong> denotes important text, but does not affect meaning.

<em> denotes important text and affects the meaning of the content by saying that it should be read/spoken with emphasis.

You are free to use CSS to change browser defaults for all of these elements.

What does an asterisk before an equal sign mean (*=) ? What about the exclamation mark?

! is part of !important; it is not a comment. The !important forces a rule to always be applied. It's typically used to override or to prevent your style from being overridden.

The *= means "contains". So in the example, the first line is looking for all children of .nav li ul li a elements with classnames that contain "icol-".

What does mean /*! some url or text */ in css

The exclamation mark is to keep an comment important . This comment will not be deleted while compressing. This is important e.g. for keep a licence in a CSS file after compressing. Uglify or YUICompressor will keep that comment after compressing.

/*! important comment will not be deleted while compressing */ 


Related Topics



Leave a reply



Submit