KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have seen some developers write HTML: <div class="test"> some content </div> CSS: div.test { width:100px. } What is the purpose of doing div.className instead of just .className . Does this mean this style will be applied only when the class is applied to a div. So, <span class='test'>content</span> will have no effect of 'test' with the css above? If that is the case, is that best practice? This is almost like style overriding for different type of elements, mixing styles with rules!
Tags (comma-separated)
Save Edits
Cancel