Skip to main content
Answer

HTML image editing

  • January 9, 2024
  • 8 replies
  • 143 views

Forum|alt.badge.img

Hello, I have used a GIF instead of an image on a widget but i dont know how to remove the white space at the bottom and also the scroll panel at the side. I have tried resizing but no luck, any ideas? 

 

Best answer by Kelly

I recently ran into this issue using the HTML widget to display a gif that was linked to another page within Docebo - in order to fix it, I had to use CSS.  It took me a long while to figure it out, but this is what eventually worked for me:

 

style.htmlwidget .content-img {

    max-width: 100%;

    height: 100%;

This worked :)

8 replies

KMallette
Hero II
Forum|alt.badge.img+9
  • Hero II
  • January 9, 2024

@Kelly Are you resizing the .gif, or the widget? Making the widget min-height a bit taller should help with the scroll bar.  I’m not sure what would make the white space go away.

Do you need to use the .gif format (due to motion, etc.) or can you try a .jpg/.png format?


trose23
Helper III
Forum|alt.badge.img+3
  • Helper III
  • January 9, 2024

I recently ran into this issue using the HTML widget to display a gif that was linked to another page within Docebo - in order to fix it, I had to use CSS.  It took me a long while to figure it out, but this is what eventually worked for me:

 

style.htmlwidget .content-img {

    max-width: 100%;

    height: 100%;


Forum|alt.badge.img
  • Author
  • Novice III
  • January 10, 2024

@KellyAre you resizing the .gif, or the widget? Making the widget min-height a bit taller should help with the scroll bar.  I’m not sure what would make the white space go away.

Do you need to use the .gif format (due to motion, etc.) or can you try a .jpg/.png format?

Thanks for this. I need the widget to also match the size of the others on the page. Yes, i need the motion of the GIF 


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • January 14, 2024

Because of your need to set the widget to the same height, is the image itself set to the same size? Is the GIf the same size? scrolls show up when your content is larger than the container, so is it possible that the image has a gap space, even a transparent one underneath it not being accounted for? 


Forum|alt.badge.img
  • Author
  • Novice III
  • Answer
  • January 15, 2024

I recently ran into this issue using the HTML widget to display a gif that was linked to another page within Docebo - in order to fix it, I had to use CSS.  It took me a long while to figure it out, but this is what eventually worked for me:

 

style.htmlwidget .content-img {

    max-width: 100%;

    height: 100%;

This worked :)


Forum|alt.badge.img
  • Contributor III
  • January 24, 2024

I don’t know why this isn’t working for me!

I have a GIF in HTML because I want the image to link to a course catalog, but it has a scroll bar. If I set the widget height, it is no longer responsive to screen size.

I used this CSS in my brand configuration and it is still showing a scroll bar.


trose23
Helper III
Forum|alt.badge.img+3
  • Helper III
  • January 24, 2024

I don’t know why this isn’t working for me!

I have a GIF in HTML because I want the image to link to a course catalog, but it has a scroll bar. If I set the widget height, it is no longer responsive to screen size.

I used this CSS in my brand configuration and it is still showing a scroll bar.

I just looked at my widget set up.  I used this CSS, as mentioned, and did NOT include a widget height in my widget itself.

This was the coding I used for my HTML widget which was a 2/3 page widget I was trying to match height with an image widget:

<a href="TARGETPAGELINK" target="_blank" rel="noreferrer noopener"><img style="display:block;margin-left:auto;margin-right:auto;" src="GIFLINK" alt="ALTHOVERLANGUAGE" width="1000" height="482" /></a>


Forum|alt.badge.img
  • Contributor III
  • January 24, 2024

PUUUUURRRRRRRRRRFect! Like a cat birthday! Thank you! This worked! Beautiful.