PricingBlog

URL in background

  • tinsoldiers-1478055257647874138

    Tinsoldier

    4 months ago

    Does anyone know how to put a formula in url for background for a div?
    1478055325604122724-Screenshot_2026-03-02_at_15.42.07.png
    2
  • Here? Or a workaround?
  • andreasmoller-1478056475745321091

    Andreas Møller

    4 months ago

    Anytime you want to use a formula in css you need a css variable
  • tinsoldiers-1478154899576459496

    Tinsoldier

    4 months ago

    I tried using a css variable. But then in the url box, am not sure if teh css variable works. Unless there is a specific way to enter it.
  • andreasmoller-1478161821792997377

    Andreas Møller

    4 months ago

    I dont think the input supports it at them moment bu you can input it in css view
  • The AI assistant should be able to explain how if you run into problems.
  • whitep4nth3r-1478292363330977823

    salma

    4 months ago

    In these situations at the moment it works to add a style attribute in the attributes panel and set the background image from a variable/formula from there.
  • tinsoldiers-1478681124900175912

    Tinsoldier

    4 months ago

    Thanks. this helps!
  • moon.pie.-1516580056829268002

    Moonpie

    19 days ago

    Hi! im glad i found this because having css variable support for BG images would be useful Blurry Image Placeholder technique. I did try to manually type in the variable name CSS but didn't have any luck
  • moon.pie.-1516582776437215302

    Moonpie

    19 days ago

    also the style attribute does work perfectly fine as well!
  • marija_0104-1517079284697661510

    Marija Gerasimovska

    18 days ago

    You can create a variable with syntax "Any" and use that one for setting the url image. The value of the formula should look something like this url(https://toddle.dev/cdn-cgi/imagedelivery/ZIty0Vhmkm0nD-fBKJrTZQ/toddle:toddle-default-image.jpg/540)
    🔥1
  • marija_0104-1517080109469794395

    Marija Gerasimovska

    18 days ago

    Then just use that variable in the image url input field.