InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

CSS

    CSS selectors

    • CSS selectors

    CSS properties

    • CSS properties

    CSS cookbooks

    • !important annotation
    • Align div in center horizontally
    • Align div in center vertically
    • Align multiple divs horizontally
    • Align text in center horizontally
    • CSS - drop cap effect
    • CSS - enlarge image on hover
    • CSS - round toggle switch using checkbox and label
    • CSS automatic table row numbering
    • CSS circle and oval
    • CSS clearfix - clear float automatically using ::after
    • CSS counters
    • CSS nested counters
    • CSS3 gradients
    • Create CSS triangles
    • First letter capital and bigger
    • How to display text on image using css
    • Install sass on Mac or Linux using ruby gem
    • Place a div in bottom right corner of browser
    • Test site css, javascript, html in old IEs
    • csslint
    • inherit value
    • initial value
    • inline-block and baseline alignment
    • margin collapsing
    • node-sass quick start tutorial on Linux and Mac
    • unset value
    • web typography
     
    • Home
    • > Tutorials
    • > CSS

    CSS – drop cap effect

    on Apr 1, 2016

    CSS drop cap effect can be achieved by making first letter of bigger size (keeping line height not so large) and the applying float:left on it. In addition we can capitalize it.
    css-drop-cap-effect

    <style>
    .box {width: 200px;}
    div.box::first-letter {
      font-size: 200%;
      font-weight: bold;
      text-transform: uppercase;
      float: left;
      line-height:1.1;
    }
    </style>
    
    <div class="box">
    lorem ipsum dolor sit amet, consectetur adipiscing
    elit, sed do eiusmod tempor incididunt ut labore
    et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation
    </div>
    refresh done
    try it online

    Suggested posts:

    1. HTML5 drag and drop – move an element to dropzone
    2. CSS – how to do first letter capital and bigger
    3. CSS transition – animation effect when properties change
    4. CSS float – floating left, right and clearing
    5. CSS letter-spacing – additional spacing between adjacent chars
    6. CSS ::first-letter pseudo element
    7. Mac – how to copy, alias, move using drag/drop and mouse pointer indicators for these
    8. CSS – align multiple divs horizontally
    Share this article: share on facebook share on linkedin tweet this submit to reddit
    Posted in Tutorials | Tagged CSS, CSS cookbook, Tutorials

    Follow InfoHeap

    facebook
    twitter
    googleplus
    • Browse site
    • Article Topics
    • Article archives
    • Recent Articles
    • Contact Us
    • Omoney
    Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

    Copyright © 2023 InfoHeap.

    Powered by WordPress