Reputation: 6294
I've read how to implement block link from this source: http://green-beast.com/blog/?p=74 However, I don't know how to apply it to tag located inside tag. As my html code is following this format:
<li class="">
<span>
<strong>
<a href="#">Text</a>
</strong>
<span class="Count">Number</span>
</span>
</li>
Upvotes: 0
Views: 3131
Reputation: 650
A <span>
is an inline element, so it should not contain a block link. This is because inline elements should never contain block elements. Try this HTML (removed <span>
):
<li class="myList">
<strong>
<a href="#">Text</a>
</strong>
<span class="Count">Number</span>
</li>
And CSS:
li.myList strong a { display:block; }
If anything there looks confusing, you might want to do some reading of "CSS selectors" and "inline and block elements in css".
Upvotes: 3