質問編集履歴

2

margine消したときの追加

2018/06/08 09:54

投稿

shinriyo
shinriyo

スコア44

test CHANGED
File without changes
test CHANGED
@@ -104,6 +104,22 @@
104
104
 
105
105
  </html>
106
106
 
107
+ ```
107
108
 
108
109
 
110
+
111
+ marginを外すと大きく表示はされるのですが、上下の日時やタイトルが出てしまいます。これを消したいです。
112
+
109
113
  ```
114
+
115
+ @page{
116
+
117
+ size: 21.0cm 29.7cm ;
118
+
119
+ /* margin: 0; */
120
+
121
+ }
122
+
123
+ ```
124
+
125
+ ![イメージ説明](c15a75aff8cb4272813e3332b62ddc1a.png)

1

html

2018/06/08 09:54

投稿

shinriyo
shinriyo

スコア44

test CHANGED
File without changes
test CHANGED
@@ -27,3 +27,83 @@
27
27
 
28
28
 
29
29
  このようになります。なぜでしょうか?
30
+
31
+
32
+
33
+ HTML, cssはこれです
34
+
35
+ ```
36
+
37
+ <html>
38
+
39
+ <head>
40
+
41
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
42
+
43
+ <title>test</title>
44
+
45
+
46
+
47
+ <style type="text/css">
48
+
49
+ body,div,table,thead,tbody,tfoot,tr,th,td,p { font-size:small; padding:0 }
50
+
51
+ body { -webkit-print-color-adjust: exact; line-height: 1; }
52
+
53
+
54
+
55
+ body, tbody {margin: 0; border:0; padding:0;}
56
+
57
+ @page{
58
+
59
+ size: 21.0cm 29.7cm ;
60
+
61
+ margin: 0;
62
+
63
+ }
64
+
65
+
66
+
67
+ sticky_table tr, td {
68
+
69
+ line-height: 100%;
70
+
71
+ }
72
+
73
+
74
+
75
+ </style>
76
+
77
+
78
+
79
+ </head>
80
+
81
+
82
+
83
+ <body>
84
+
85
+ <table class="sticky_table" style="table-layout:fixed; width: 21.0cm; height: 29.7cm;" cellspacing="0" border="0">
86
+
87
+ <tbody>
88
+
89
+ <tr style="height: 100%;">
90
+
91
+ <td style="border: 2px solid black;">hoge</td>
92
+
93
+ </tr>
94
+
95
+ </tbody>
96
+
97
+ </table>
98
+
99
+
100
+
101
+ </body>
102
+
103
+
104
+
105
+ </html>
106
+
107
+
108
+
109
+ ```