/ Published in: CSS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Question: Is it possible to make a CSS class that "inherits" from another CSS class (or more than one). For example: .test { width:200px;display:block } .logo { background:#cc;border:1px solid #4d4d4d } I'd like to do is something like this: .combine { .test; .logo } where the ".combine" class would use all the attributes like width 200px, display block, background color #ccc and border color. Answer: Good Question my friend. But i think you can't do something like that. It would be much helpful for a developer if this is possible! Instead you can use multiple classes to a single block element. For Example: <div class="test logo ">text text text</div>
URL: http://htmlcsstutorials.blogspot.com/2009/07/css-class-inherit-one-or-more-other.html