Drop cap CSS stopped working

Dear X-Team,

Back in 2017 I added the following custom CSS on Cornerstone (I am using X 6.5.5) to capitalize the first body letter of every blog post.

 .single-post div.entry-content > p:first-child:first-letter { 
    float:left; 
    font-size:4em; 
    color: #363030; 
    margin-right:0.10em; 
    line-height:90%; 
    text-shadow: none; 
}

After successive X updates since then, I just noticed during maintenance that the drop cap effect does not work anymore. Are the selectors in this CSS still valid?

You can check this post, for example: https://www.2cameras1bucketlist.com/road-trip-scenic-italy/

Thank you very much in advance, I appreciate your support

Kind regards,

David

Hey David,

I have checked your site and I could see that there is a new hidden input element added to the post content:

This is the reason why the CSS code you are referring does not work anymore because p is not the first child of the entry-content div but the hidden input element.

So to fix this issue, please update your code to:


.single-post div.entry-content > p:first-of-type:first-letter { 
    float:left; 
    font-size:4em; 
    color: #363030; 
    margin-right:0.10em; 
    line-height:90%; 
    text-shadow: none; 
}

Hope this helps.

Thank you so much for the quick answer!

It worked! All good now :slightly_smiling_face:

Thanks a lot Jade!

You’re most welcome, David.

Have a nice week ahead! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.