For example I have a "li" tag that inside it there is an "a" tag. I want the whole row to have a border-bottom: 1px solid #ccc;
<li class=sub"> <a href="3" class="active"> <span id="1">Text</span> </a> </li> Currently I have
span { width: 90%; border-bottom: 1px solid #ccc; font-size:12px; } li { width: 100%; } But it seems that only the Text will get underlined, i would want the whole "li" which takes like a whole row to be underlined. But not underlining the "li" but the "span" tag. So basically would want my "span" tag to be same width as parent "li" not sure what i am missing on my CSS.
display:inline-blockfor your span in your css.