• Resolved kghugo2000

    (@kghugo2000)


    Dear developers,

    I want to add a drop cap via css coding to the subheading, and I tried to use the following code but it doesn’t work. What should I do?

    .sub-title-primary :first-child:first-letter {
      color: #903;
      float: left;
      font-family: Georgia;
      font-size: 75px;
      line-height: 60px;
      padding-top: 4px;
      padding-right: 8px;
      padding-left: 3px;
    }

    Thank you for reading and your help.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Mitali Rajpurohit

    (@mitalideva)

    Hii kghugo2000,

    Hope you are doing well..!!

    Here is solution to add dropcap via css in your website.

    1> Kindly add below script in footer.php
    <script>
    $=jQuery;
    $( “.sub-title-primary” ).wrapInner( “<p></p>” );
    </script>
    Note: which will cover subtitle in p tag.
    2> Add css in file:
    .sub-title-primary > p:first-of-type:first-letter {color: #903;
    float: left;
    font-family: Georgia;
    font-size: 75px;
    line-height: 60px;
    padding-top: 4px;
    padding-right: 8px;
    padding-left: 3px;
    }

    This will work..!!

    Let me know if i can help you more..!!

    Thread Starter kghugo2000

    (@kghugo2000)

    Hi Mitali,

    I have tried to use that solution but it is not working. Can you check it again for me? I think the problem may be .sub-title-primary > p:first-of-type:first-letter, but I am not sure.

    Thank you for reading and your help.

    Plugin Contributor Mitali Rajpurohit

    (@mitalideva)

    Hi kghugo2000,

    I have seen above url. Kindly add below code in footer.php. It will add p tag in subittle. After that Above css will work.

    <script>
    $=jQuery;
    $( “.sub-title-primary” ).wrapInner( “<p></p>” );
    </script>

    Let me know if you need more guidance.

    Thread Starter kghugo2000

    (@kghugo2000)

    Hi Mitali,

    Thank you for your help. I have tried your code again but still it doesn’t work.
    I have checked my footer.php and I am sure I have entered those code. Do I need to input those code in a specific location inside footer.php?

    Thank you for reading and your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Adding a dropcap to the subtitle’ is closed to new replies.