HTML/CSS Service

CSS Universal (*) Selector

Category: CSS, CSS Examples, CSS3 Tutorial    |    1,111 views   |   

Universal (*) Selector

Matches any element type.

Syntax

HTML
* { sRules }


Scripting

N/A

Possible Values

sRules String that specifies one or more Cascading Style Sheets (CSS) attribute/value pairs.
Remarks

The universal selector matches every element in the document tree. If the universal selector is not the only component of a simple selector, the “*” may be omitted. For example:

*.myclass and .myclass are equivalent.
*#myid and #myid are equivalent.
*:hover and :hover are equivalent.

Example

The following style rule draws a thin orange border around every element on the page.

<style>
* { border: 1px solid orange; }
</style>

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • digg
  • del.icio.us
  • Stumble it
  • Furl
  • Reddit
  • BlinkList
  • Simpy
  • YahooMyWeb
  • Spurl

Share/Save/Bookmark

1 Star2 Stars

Tags: , ,

0 responses so far!

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word