css - Google apps script: style tags work in index.html but not stylesheet.html -
i'm noob @ gas, please forgive stupid question...
my simple css style works when part of index.html, not when part of stylesheet.html. doing wrong? in advance!
index.html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> <script> $(function() { $( "#studproptabs" ).tabs(); }); </script> <div id="studproptabs"> <ul> <li><a href="#maintab">basic information</a></li> <li><a href="#schedtab">schedule & course drops</a></li> <li><a href="#plantab">planning</a></li> <li><a href="#misctab">off-campus & partner info</a></li> </ul> <div id="maintab"> <form id='propform'> <fieldset> <div> <label class='mainform' for='firstname' >first name</label> <input type='text' id='firstname' /> </div> <div> <label class='mainform' for='lastname' >last name</label> <input type='text' id='lastname' /> </div> </fieldset> </form> </div> </div>
stylesheet.html
<!-- css package applies google styling; should included. --> <link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons.css"> <style> label { display: inline-block; width: 5em; color: red; } </style>
code.gs
function doget(e) { return htmlservice.createhtmloutputfromfile('index') .settitle('senior project proposal form') .setsandboxmode(htmlservice.sandboxmode.iframe); }
there's no page included, must specify it, said in good practices:
in code.gs:
function include(filename) { return htmlservice.createhtmloutputfromfile(filename) .setsandboxmode(htmlservice.sandboxmode.iframe) .getcontent(); }
in index.html:
<?!= include('stylesheet'); ?>
Comments
Post a Comment