I don't think you can do that with text-decoration:underline, but instead you can have text-decoration:none and use e.g. border-bottom: 1px solid red to achieve the same effect. Might need to adjust the bottom padding to get it looking ok.