Star selector: What it is and its uses

This post explores more about the Star {*} selector used in CSS. We take a look at its uses and benefits.So, the star selector is a fairly simple thing. The main advantage of it is that it selects all the elements on your webpage. This is used when you want to apply some common styling to the webpage.

The best examples are resetting margins and padding of a page to 0.

margin: 0;
padding: 0;
/*Probably some other styling you want on the whole page*/

/*class based styling*/

So as you can see the star selector selects all the elements for you to apply styling on.

I find this useful when:-

  • I want to do basic editing on a web-page.
  • I want to apply background colours.
  • [maybe] Apply some padding on the elements.

So, this was the overview of the star selector (*) used in CSS. Subscribe for more awesome posts.

Did you find this guide useful? If yes, then hit the like button below or rate it 5 stars.

If no, what else do you have to say in the topic. Add your comments below. (↓)

Enter your email address to follow this blog and receive notifications of new posts by email.

One thought on “Star selector: What it is and its uses

Add your Awesome voice. Let's have a meaningful conversation. And remember, don't be a spammer (We hate 'em).

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s