I'm using a button where the type is set to an image. Purpose of the button is to open a modular that gives more information on a category. The image is a .png and has a transparent background. I've also tried to use an image with a white background to match my form. Every time I use either images, SharePoint makes the background black. Does anyone know how to fix this?
Solved! Go to Solution.
That's right, you can't store Client ID's on a label, but you can for input controls. It is possible to use the CSS class with Jquery to select the element and add a click event. But maybe that just adding too much complexity.
Ok, so I added a CSS class to an image button. Then in my custom CSS for the form I set the background color to transparent and it worked.
background-color: transparent !important;
I noticed I could change the background color to the button in the ribbon and the transparent area would show the color I selected. So it was working "transparently", but the issue was that I could not default the background color to transparent. I needed this extra css to solve it.
I actually ended up recreating the icon to match the background color of the form. That ended up working. When I initially tried that, I didn't remove the alpha channels that give the png transparency. Once I removed them and combined layers it worked. Thanks Andrew!