Thread: Move text/code
View Single Post
Old 08-31-2025, 04:23 PM   #6
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,368
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Personally, I don't like using the <span> technique for first letters...it can cause issues with searching, etc. because it breaks up the word. I use css to handle all the styling. If the user's device/app recognizes the css, then it looks great. If it doesn't support the css then they get a slightly reduced quality look...

Code:
CSS:
/* First Para in Chapter in lieu of Drop Caps */
p.first               {text-indent:0; font-size:1em; clear:both}
p.first::first-letter {font-family:serif; font-size:2em; font-weight:bold;
                       float:left; margin:-.1em .1em}
p.first::first-line   {font-variant:small-caps; font-size:1.15em}

HTML:
<p class="first">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
Click image for larger version

Name:	Screenshot 2025-08-31 162730.png
Views:	29
Size:	306.5 KB
ID:	217820

Last edited by Turtle91; 08-31-2025 at 04:28 PM.
Turtle91 is offline   Reply With Quote