Skip to content Skip to sidebar Skip to footer

Group Css Tags Within A Single Div

I have a bunch of different CSS edits for different tags within the same div and want to know if there is a way to group them under one div? This is what I have right now: #nav{

Solution 1:

If I interpret your question correctly, that shortcut is impossible in pure CSS. You may want to look into SASS or LESS, which are metalanguages of CSS, meaning that valid CSS is a subset of valid SASS/LESS. Both of these support constructs where

#nav{ 
    thing: example; 
    .child { more: styles; }
    .extra { style: great; } 
}

which would be interpreted into CSS as

#nav {
    thing: example; }

#nav .child { more: styles;}

#nav .extra { style: great;}

Post a Comment for "Group Css Tags Within A Single Div"