Sometimes you don't want an underline blindly cutting through an underlined page title!
Is there a way to automatically elegantly disable underline for certain lowercasee characters?
In these cases it's nicer not to underline these lowercase letters like {g,q,p,j, y}
CSS:
h1{ text-decoration: underline; }
PAGE TITLE:
George quietely jumped!
A) Is there any way one could achieve such a delicate and advanced styling rule?
B) What other Latin characters do we want to un-underline?
C) How to set the thickness/thinness of the underline?
To remove underline from a link in HTML, use the CSS property text-decoration. Use it with the style attribute. The style attribute specifies an inline style for an element. Use the style attribute with the CSS property text-decoration to remove underline from a link in HTML.
The underline can be easily remove by using text-decoration property. The text-decoration property of CSS allows to decorate the text according to requirement. By setting the text-decoration to none to remove the underline from anchor tag.
The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration ) from its original position.
you can as well fake underline with a border-bottom. this can work for single lines and if display properties allows element to shrink on content. (just avoid block ).
here an example with a display:table
to allow center text and break line before and after : http://codepen.io/gc-nomade/pen/vJoKB/
What's the idea ?
stroke
, in CSS , we can do something similar increasing text-shadow
with same color as background.In older browser you will lose the box-shadow
option, but you still can use the double
, groove
or ridge
border
styles with different color than text.
Thanks @PatNewell for sharing this very link : https://medium.com/designing-medium/7c03a9274f9
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