Arky
Arky

Reputation: 380

CSS Styling HtmlService.createHtmlOutput

How do you style the whole page background color of your apps script embedded in a Google sites web page. Currently I could use a div like this.

function doGet() {
  return HtmlService.createHtmlOutput('<div style="background-color:#e9eccf"<h1>Hello</h1><p>Test</p></div>');
  }

Any other ways to CSS style the HtmlService output?

Upvotes: 0

Views: 930

Answers (1)

Eric Koleda
Eric Koleda

Reputation: 12673

Normally you would do this by applying a style to the <body> element. Unfortunately there is currently a bug in the Caja engine, which HtmlService uses, that prevents it from working. For the time being the best solution is to use a wrapping div that you can style.

Upvotes: 2

Related Questions