How do I write my class so that it isn’t selector specific?
Just like any other style. I will assume that you know a little something about this if you are already here and reading this entry. If we got back to our stylesheet, you would retype;
div.wrapper{}
Instead to look like this;
.wrapper{}
This way, you can apply this style to any element you want, including the paragraph(p) and list(li) element tags I used in the above example.
Here are some similar arcade posts
- How do I write my css classes with div tags?
- Why do I want to write class independant of my selectors?
- Formatting Ordered lists so they look like an outline in Microsoft Word.
- Style sheet precedence in table cells and stylesheets
- Which should I use, relative or absolute positioning?
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.











Comments
No comments yet.
Leave a comment
Your email address is never displayed and cannot be spammed. Read our comment privacy policy.