CSS Drop Caps Without Unnecessary HTML Elements or Classes


/ Published in: CSS
Save to your folder(s)

Learn how to create drop caps using CSS and no extra HTML markup in this short tutorial.


Copy this code and paste it in your HTML
  1. body p:first-child:first-letter
  2. {
  3. background: #990000;
  4. border: 4px double #ffcc00;
  5. color: #ffffff;
  6. float: left;
  7. font-family: "Times New Roman", Times, serif;
  8. font-size: 3em;
  9. font-weight: bold;
  10. margin: 7px 10px 0px 0px;
  11. padding: 10px;
  12. text-transform: uppercase;
  13. }

URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=41

Report this snippet


Comments


You need to login to view comments.