Timeline for Dynamically load a background image
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Dec 9, 2014 at 15:59 | history | suggested | Jamie Wade | CC BY-SA 3.0 |
Code tidying up
|
Dec 9, 2014 at 15:59 | vote | accept | misteroptimist | ||
Dec 9, 2014 at 9:45 | review | Suggested edits | |||
S Dec 9, 2014 at 15:59 | |||||
Dec 9, 2014 at 9:24 | answer | added | Alec Ritson | timeline score: 10 | |
Dec 9, 2014 at 1:12 | comment | added | carlcs |
You overwrite background-repeat etc. set in you CSS with that. @Alec, please add your comment as an answer!
|
|
Dec 9, 2014 at 0:37 | comment | added | misteroptimist | Brilliant!!! Why does "background-image" work but "background" doesnt | |
Dec 8, 2014 at 22:25 | comment | added | Alec Ritson |
Try style="background-image:url({{ image.getURL() }})" instead, this means you would only overwrite the image and not any of the other background properties
|
|
Dec 8, 2014 at 22:12 | comment | added | misteroptimist | When I add in "style="background: url({{ image.getURL() }})"> It gives me my image all wonky. It doesn't keep its responsiveness or other properties in the css. | |
Dec 8, 2014 at 22:09 | comment | added | misteroptimist | I made a few edits for you to see some more of my code. I feel like I'm overcomplicating it. This may be more of a css question than a craft question at this point. I need to dynamically set the #hero background url based on what series i'm currently in. Does that make sense? | |
Dec 8, 2014 at 22:08 | history | edited | misteroptimist | CC BY-SA 3.0 |
added 2610 characters in body
|
Dec 8, 2014 at 21:51 | comment | added | naboovalley | Can you add some more code examples from the template and CSS so we can see how it's setup? Doesn't sound to difficult. | |
Dec 8, 2014 at 21:48 | history | asked | misteroptimist | CC BY-SA 3.0 |