How to outline the bottom border of a first letter? In the example below, p:first-letter
, all I get is the red underline. Can't even score the first-letter outline (Outline = Block Elements)! Is there some other way to code an outline for the bottom border of a :first-letter
?
I tried CSS combinatory tricks, etc. without success. I feel certain that a pseudo attribute and/or pseudo element of some sort would display for browser DOM whatever the Word application programmers are displaying in documents when a cursor touches a word and outlines the bottom border under the first letter of that touched word (this attractive programming artifact or feature does not print. The linked sample is font Impact, font-size 36 in Wordpad.exe. Outlined border under the small "t".
Expected Output:
p:first-letter {border-bottom: 1px solid red;font-size: 48px;}
p:first-letter*=["border-bottom"] {outline: green solid thin;}
<p><span class="spec">Note...</span> Outline properties work best if !DOCTYPE is specified.</p>
CSS3 has the property border-image
. Add border-left: 0;
etc., or border-image: url(border.png) 0 0 30 0 stretch;
and you can see that border-image can display only on the bottom (not inline, for block elements).
CSS Tricks - Gradient Borders [pseudo element block knockout]
You can play around for free at the W3 schoolhouse, where some css3 properties are supported for border image. Failing all else, fuss up a drop-cap arrangement, but the span is there in the example for a reason: we want image-border property's outline inline. This means adapting ["knock out"?] DOM's HTML behavior with element and/or attribute selectors. Any ideas?
References
"CSS3 Visual Quickstart Guide", Jason Cranford Teague, chapter 6 Text Properties, page 167.