Avoiding redundancy with selector groups


show more Avoiding redundancy with selector groups provides you with in-depth training on Web. Taught by Justin Seeley as part of the CSS: Visual Optimization show less
please wait ...

Avoiding redundancy with selector groups

Another great way to avoid redundancy, and also to save yourself a lot of time in writing CSS is to use something called a Selector Group. I've got open here the meyer_reset.css document that's available to you in your Assets folder. If you don't have access to that, that's okay just take a look at what's on screen. And so basically, what we have here, as you can see is a bunch of different tags all grouped together separated by a comma, and then a declaration after that of all of these different properties that all of these things share. Now, I could have just written it out where HTML would be its own tag, and it would have all these properties, body be its own tag, have all these properties.

But instead of writing all that out multiple times and having redundant CSS in my document, what I've done is created something called a Selector Group, so all of these are selectors, and this selector group now shares all of these properties. And since I've spelled them out, sep...

Avoiding redundancy with selector groups
Video duration: 4m 25s 1h 11m Beginner

Viewers:

Avoiding redundancy with selector groups provides you with in-depth training on Web. Taught by Justin Seeley as part of the CSS: Visual Optimization

Subject:
Web
Software:
CSS
Author:
please wait ...