Hi there, I would like to know if there is a nicer CSS approach for the following effect:
<style type="text/css"> a { color: #000000; text-decoration: none; } a:hover, a:active { text-decoration: underline; }</style><a href="#"> w3schools </a>
Using & nbsp; in both sides is a way. But can I use padding, and include a "box" inside the <a> and let the <a> underline the whole "box" with padding? (i tried but this does not work.) The concept is:
<style type="text/css"> a { color: #000000; text-decoration: none; } a:hover, a:active { text-decoration: underline; } div { padding: 0px 2px; }</style><a href="#"><div>w3schools</div></a>
It underlines only the words, but skipping the paddings THANKS very much for any helps or input!midnite