Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Search Engine Optimization (http://siteownersforums.com/forumdisplay.php?f=16)
-   -   What Is Grouping In CSS3? (http://siteownersforums.com/showthread.php?t=200482)

redspiderae 08-10-2017 03:57 AM

What Is Grouping In CSS3?
 
Hello Friends,

What Is Grouping In CSS3?

crackersguru 08-10-2017 09:44 PM

Grouping in CSS is a technique used to reduce code redundancy and write clean, concise easy to follow code. There are going to be many instances in which multiple CSS selectors will have the same declarations. In these cases, you can group all the selectors together and write the declarations only one time. For example, if you want to apply the exact same font size and color to three different headings you can write it as shown below.

h1{

font-size: 10px;

color: green;

}

h2{

font-size: 10px;

color: green;

}

h3{

font-size: 10px;

color: green;

}

beastlinks777 08-10-2017 10:13 PM

Instead you can shorten the code by grouping it like example below.
h1, h2, h3 {

font-size: 10px;

color: green;

}


All times are GMT -7. The time now is 03:01 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.