I have a page which needs to display an image from a media library. I would prefer to set the image as a background image if possible. In the web part properties if I enter as part of an html envelope then nothing appears
<div class="clinImage" style="background-image:url({%# IllustrationImageFromMediaLibrary %});">
I can get the image to appear on the page but not as a background image if I use
<img src="{% IllustrationImageFromMediaLibrary %}" />
Any ideas on the best way to call in IllustrationImageFromMediaLibrary as a background image. Once I have done this I can then add other HTML elements for rollovers etc
Hi,
It should work if you remove the #-sign.
so:
<div class="clinImage" style="background-image:url({% IllustrationImageFromMediaLibrary %});">
Greets,
David
Many thanks, thought it would be something small. Thats 6 hours I won't get back.
Please, sign in to be able to submit a new answer.