I might be missing something and it can easily be done in the code but it would be nice to be able to add image backgrounds to various elements directly in the properties panel - containers, jumbrotrons, divs etc
Well for this and other general CSS styling we have the CSS Designer, so just:
- Select the element you need to style
- go the the āStylesā panel on the left.
- Click behind āelement.style {ā
- beging typing with backgr⦠and select background-image
- type as value: url(myimage.jpg)
- hit enter and you are done
This produces the inline style in the html for the background image you need. You can add there in the same way many other CSS options as inline styles - or just create classes for reuse later on.
Thanks George - Iāve just never clicked behind āelement.style {ā before. I think out of habit Iāve been adding the css for anything that isnāt in the properties panel manually. So obvious, i might just have to feel a bit silly for a while - but Iāll get over it!
Yes a lot of hidden powers out there - but once you discover them - you love them
Iāve tried using a ācontainerā element on my homepage to add a background image - doing just as you described. No image displays. Should I be using another element, nested inside the container where I want it to display?
Does it make any difference what image format (png, jpg, gif etc.)? Iām at a loss to what Iām doing wrong!
Try giving your container an id and assign the background-image to #yourid
Thatās not correct.
Select you container in design view. In the CSS Panel click to create a new rule and add your background there.
You should end up with somethingh like:
#home {
background-image: images/crucifix_bkgrnd.jpg;
}
Hello, the background image value you entered is wrong.
It should be:
background-image: url(āpath/image.jpgā)
Thank you for the example⦠I finally got my background image to display.
(Please see my bug report about v1.0.5 in the āBugsā category.)
So is there an image selection helper or must you hand code everything?
I was using incorrect syntax and followed Teodor's suggested code in the Styles panel which worked for me. (I don't know if this has been updated or not in Wappler).