How To Make The Picture Caption In My Favorite Font Style ?

1 Comments

  • Ifra Saqlain
    Community Moderator
    Zendesk Luminary
    Most Engaged Community Member - 2022
    Most Engaged Community Member of The Year - 2021

    Hey Delilah Jacob, you can easily do this. Just follow the below steps:

    1). Download the fonts.

    2). Upload that into your assets folder.

    3). Wrap your image caption inside the div.

      <img src="IMAGE-NAME-HERE" alt="IMAGE-NAME-HERE" style="width:100%">
    <div class="caption"><caption> Caption text here </caption></div>

    /** class name: caption **/

    4). Go to your style.css file and map your font with the caption class. Copy and paste the below CSS code as it is.

     @font-face {
    font-family: 'cabana';
    font-display: swap;
    src: url($assets-cabana-regular-otf) format("truetype");
    font-weight: 400;
    }

    .caption {
    font-family: "cabana", $text_font;
    }

     Now test and if any issue, do let me know :)

    Thanks

    Ifra Saqlain

     

    0

Please sign in to leave a comment.

Powered by Zendesk