Search code examples
cssanchorunderline

Fix broken <a> decoration with multiple spans


So, i have

<a href="#">R<span class="superscript">5</span></a>

and the underline for my anchor is broken (meaning the underline for the R is at the baseline, and the underline for the 5 is in the middle of the R -- because the 5 is small), which i don't want. How do i get the anchor underline to be one unbroken line under both the R and the 5 (at the baseline)?

thanks.


Solution

  • I'm not sure if it would work or whether there are nicer solutions, but you can remove the underline and add a bottom-border to the a element.