HTML offset positioning

POST https://api.shotstack.io/{{ENV}}/render

Template that positions HTML in the viewport.

HTML positioning preview

Example image

Request Body

{"timeline"=>{"tracks"=>[{"clips"=>[{"asset"=>{"type"=>"html", "html"=>"<p>MAIN HEADING</p>", "css"=>"p { font-family: \"Montserrat ExtraBold\"; color: #25d3d0; font-size: 34px; text-align: left; }", "width"=>600, "height"=>100}, "start"=>0, "length"=>1, "position"=>"topLeft", "offset"=>{"x"=>0.1, "y"=>-0.07}}, {"asset"=>{"type"=>"html", "html"=>"<p>A sub heading</p>", "css"=>"p { font-family: \"Work Sans Light\"; color: #ffffff; font-size: 28px; text-align: left; }", "width"=>600, "height"=>100}, "start"=>0, "length"=>1, "position"=>"bottomLeft", "offset"=>{"x"=>0.1, "y"=>0.07}}]}]}, "output"=>{"format"=>"png", "resolution"=>"sd"}}

HEADERS

KeyDatatypeRequiredDescription
cache-controlstring
content-typestring
postman-tokenstring
x-api-keystring