Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 应用程序脚本html服务顶部的空白_Css_Google Apps Script - Fatal编程技术网

Css 应用程序脚本html服务顶部的空白

Css 应用程序脚本html服务顶部的空白,css,google-apps-script,Css,Google Apps Script,我有一个显示html文件的简单脚本 function doGet(e) { return HtmlService.createTemplateFromFile('Final Contract Agreement').evaluate(); } 以及相应的html: <html> <head> <style type="text/css"> #content{ padding :0 0;

我有一个显示html文件的简单脚本

function doGet(e) {
     return HtmlService.createTemplateFromFile('Final Contract Agreement').evaluate();
}
以及相应的html:

 <html>
   <head>
     <style type="text/css">
     #content{
          padding :0 0;
          margin : 0 auto;
          width: 800px;
          height : 600px;
          background: #FFFFFF;
     }
     body{
         background: #dbdad4;
         margin : 0;
     }
     #header{
         width: 100%;
         height: 82px;
         background: #4F2170;
         background-repeat:no-repeat;
     }
     #header h1{
         vertical-align:middle;
         text-align:right;
         color: white;
         padding-right: 50px;
     }
     </style>
 </head>
 <body>
    <div id="header">
      <h1>
         Contract Form
      </h1>
     </div>
    <div id="content">
       <h3>
        Hello World! 
        <?= new Date() ?>
      </h3>
    </div>
  </body>
 </html>

#内容{
填充:0;
保证金:0自动;
宽度:800px;
高度:600px;
背景:#FFFFFF;
}
身体{
背景#dbdad4;
保证金:0;
}
#标题{
宽度:100%;
高度:82px;
背景:#4F2170;
背景重复:无重复;
}
#收割台h1{
垂直对齐:中间对齐;
文本对齐:右对齐;
颜色:白色;
右边填充:50px;
}
合同格式
你好,世界!
它输出了以下内容:


我尝试过在元素上设置所有边距/填充的组合,但没有任何东西可以去除顶部的空白。当我将相同的代码放在plane jane html文件中时,它工作得很好

我猜caja正在向顶部添加空格,这个css为我删除了空格:

  * {
    margin: 0;
  }
对于那些想知道我是如何让它占据整个浏览器窗口的人来说:

  html {
    height:100%;
  }
  body{
    height:100%;
  }

我猜caja正在向顶部添加空格,这个css为我删除了空格:

  * {
    margin: 0;
  }
对于那些想知道我是如何让它占据整个浏览器窗口的人来说:

  html {
    height:100%;
  }
  body{
    height:100%;
  }