Forum

canvas inline style

24 August 2017 17:16
I am trying to add some css to my app to make it look good !
But the canvas for the app is messing it up by having css propertys inline and i would like to change them. Any ideas where i could find that ???
24 August 2017 17:17
<canvas width="765" height="0" style="position: absolute; left: 0px; top: 0px; width: 765px; height: 0px;">
25 August 2017 02:46
Are you working with a custom app or a web-player export?

Have a look at "Method 3" on this page.
And example of this project can be found in your SDK: apps_dev/tutorials/web_page_integration/.
25 August 2017 12:06
Hy, thanks.
That's what i'm using. Only i use the basic app.js file and something has to be messing with the canvas CSS and i wonder if that could be changed. The top:0 and left:0 position:absolute are kind of breaking my styling. Nothing i can't fix with loads of important tags. But that isn't a tag you should use, right.
25 August 2017 19:28
Hi, the canvas' styles are sort of "reserved", because they are controlled by the engine. You should set CSS styles for the canvas container element instead. This is the element whose id you pass as a "canvas_container_id" parameter into the app initialization method.
25 August 2017 19:56
Thats exactly what i did. But i struggled i set position of container to relative !

Thanks for information.
 
Please register or log in to leave a reply.