The Lodge is members-only web design and development videos and live help. Log In or Sign Up.
@Paulie_D I think that’s not working properly.
because div choose only one value red because red is first class of this div.
> @Paulie_D I think that’s not working properly. because div choose only one value.
No. It’s only a matter of specificity / order or rules.
so if I have it like this
is there a way so I only have .flat in once and then it applys to the rest so it is not too much repeating
@HugoGiraudel Yes you are right.
`.flat` (as you have used it) will define the size of the element.
`.red` will define the background color
.`flat.blue` defines nothing in and of itself except it only targets elements with **both** classes.
In the example above, try deleting the bg color from `.flat.blue`…only the `.flat` class will apply because no `.blue` class has been defined.
> is there a way so I only have .flat in once and then it applys to the rest so it is not too much repeating
If you’re just looking at saving a way for you to have to write it out, you’ll want to use Sass/Scss:
You must be logged in to reply to this topic.
Search for Stuff
Browse the Archives
Get the Newsletter
... or get the RSS feed