How to add a background image for a text content?
  • 27 Sep 2022
  • 1 Minute à lire
  • Contributeurs
  • Sombre
    Lumière
  • PDF

How to add a background image for a text content?

  • Sombre
    Lumière
  • PDF

There is no French content available for this article, You are viewing the fallback version (English).

To add more essence to your text content, you can add a background image. The background image you want to add must be available on the web. If the background image is on your local device, you can upload it to the Drive and utilize the image URL.


Solution

  1. Go to SettingsKnowledge base siteCustom CSS & JavaScriptCustom CSS
  2. Paste the below code snippet:
.bgimg 
{ 
background-image: url("IMAGE_URL"); 
} 
  1. In the above snippet:
    • Class name is .bgimg. You can replace it as per the requirement
    • IMAGE_URL - Add your desired background image URL
  2. Click Save
  3. Navigate to the desired article and add the snippet in the editor:
<p class="bgimg">Text_content</p> 
  • Text_content - Add the desired text content
  • bgimg - If you change the class name, replicate the same changes in this field

This applies to both Markdown and WYSIWYG editors.

  1. The desired background image appears for the text content in your knowledge base

Cet article vous a-t-il été utile ?