How can I underline a text replaced with Cufon?
text-decoration
is not supported by Cufon:
https://github.com/sorccu/cufon/wiki/known-bugs-and-issues
Perhaps you could add a border-bottom
property to the element using normal CSS?
Cufon adds a class to the elements it creates that you can style (useful if your containing element has pads/margins). So for a link, just use this:
a .cufon {border-bottom: solid 1px #000000}
a:hover .cufon {border-bottom: none}
To keep your elements from shifting up/down, either add a border to the non hover state, or adjust the heights of both elements accordingly...
Be aware though. Adding a border bottom to a cufon class is quite ugly.
I'd be best to avoid underlines to these fonts in your design. It might look nice in Photoshop, but don't show this to you customers. It doesn't work out that well in HTML/CSS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With