- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am attempting to make a copyleft symbol however my normal procedure of using a class does not work whereas using an id does. I am wondering why the class does not work.
Class http://codepen.io/k1n64r7hur/pen/NGVEBv
ID http://codepen.io/k1n64r7hur/pen/OyYawW
@k1n64r7hur It’s because there’s no footer
element with class of .copyleft
footer.copyleft {}
Would target.
<footer class="copyleft"></footer>
You can just use .copyleft
in your CSS. The copy text is contained within a span
element with the class of .copyleft
so it would be span.copyleft {}
.
Hope that helps
Alen
Looking at your other question…
You should avoid targeting base html elements, ex footer.class
unless you have a very good reason.
If you’re interested in scoping try defining a parent class. I’ve forked your Pen
http://codepen.io/alenabdula/pen/vNwvVW
See when you use the just .class
for all intents and purposes it doesn’t matter what element you attach the class it will still behave as expected.
.parent {}
.parent .child {}
.parent .menu {}
<div class="parent">
<div class="child"></div>
<ul class="menu">
<li>List Item</li>
</ul>
</div>
That makes sense, thanks.