回答編集履歴

1

追記

2017/07/10 08:27

投稿

s8_chu
s8_chu

スコア14731

test CHANGED
@@ -43,3 +43,253 @@
43
43
  </html>
44
44
 
45
45
  ```
46
+
47
+ 追記
48
+
49
+ ---
50
+
51
+ いくつか文法的な誤りを修正して検証した結果、問題が再現しませんでした。以下のコードを実行してみてください。また、今回は修正していませんが、**center要素はHTML5で廃止された**ので、いつ使えなくなってもおかしくありません。**CSSで中央寄せをしましょう**。
52
+
53
+ ```HTML
54
+
55
+ <!DOCTYPE html>
56
+
57
+ <html lang="ja">
58
+
59
+ <head>
60
+
61
+ <meta charset="utf-8">
62
+
63
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
64
+
65
+ <meta name="viewport" content="width=device-width, initial-scale=1">
66
+
67
+ <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
68
+
69
+ <title>タイトル</title>
70
+
71
+ </head>
72
+
73
+ <body>
74
+
75
+ <center>
76
+
77
+ <ul id="menu">
78
+
79
+ <li><a href="#">トップ</a></li>
80
+
81
+ <li><a href="#">登録</a></li>
82
+
83
+ <li><a href="#">検索</a></li>
84
+
85
+ <li><a href="#">一覧</a></li>
86
+
87
+ </ul>
88
+
89
+ <form method="post" action="" class="form-horizontal">
90
+
91
+ <br>
92
+
93
+ <br>
94
+
95
+ <br>
96
+
97
+ <div class="form-group">
98
+
99
+ <label for="name" class="control-label col-sm-4">ID:</label>
100
+
101
+ <div class="col-sm-4">
102
+
103
+ <input type="text" name="id" class="form-control" required="required">
104
+
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+
111
+ <div class="form-group">
112
+
113
+ <label for="name" class="control-label col-sm-4">なまえ:</label>
114
+
115
+ <div class="col-sm-4">
116
+
117
+ <input type="text" name="name" required="required" class="form-control">
118
+
119
+ </div>
120
+
121
+ <div class="col-sm-1">
122
+
123
+ <select name="sex" class="form-control">
124
+
125
+ <option value="♂">♂</option>
126
+
127
+ <option value="♀">♀</option>
128
+
129
+ <option value="なし">なし</option>
130
+
131
+ </select>
132
+
133
+ </div>
134
+
135
+ </div>
136
+
137
+
138
+
139
+ <div class="form-group">
140
+
141
+ <label for="name" class="control-label col-sm-4">とくせい:</label>
142
+
143
+ <div class="col-sm-4">
144
+
145
+ <input type="text" class="form-control" name="tokusei" required="required">
146
+
147
+ </div>
148
+
149
+ </div>
150
+
151
+
152
+
153
+ <div class="form-group">
154
+
155
+ <label for="name" class="control-label col-sm-4">タイプ:</label>
156
+
157
+ <div class="col-sm-2">
158
+
159
+
160
+
161
+ <table>
162
+
163
+ <tr>
164
+
165
+ <td>
166
+
167
+ <select class="form-control" name="type1" required>
168
+
169
+ <option value="">--</option>
170
+
171
+ </select>
172
+
173
+ </td>
174
+
175
+ <td>
176
+
177
+ <select class="form-control" name="type2">
178
+
179
+ <option value="">--</option>
180
+
181
+ </select>
182
+
183
+ </td>
184
+
185
+ </tr>
186
+
187
+ </table>
188
+
189
+ </div>
190
+
191
+ </div>
192
+
193
+ <h3>種族値</h3>
194
+
195
+ <input type="text" size="5" placeholder="HP" name="sHP_d">
196
+
197
+ <input type="text" size="5" placeholder="攻撃" name="sAtt_d">
198
+
199
+ <input type="text" size="5" placeholder="防御" name="sDef_d">
200
+
201
+ <input type="text" size="5" placeholder="特攻" name="sSatt_d">
202
+
203
+ <input type="text" size="5" placeholder="特防" name="sSdef_d">
204
+
205
+ <input type="text" size="5" placeholder="素早" name="sQui_d">
206
+
207
+ <br>
208
+
209
+
210
+
211
+ <h3>個体値</h3>
212
+
213
+ <input type="text" size="5" placeholder="HP" name="kHP_d">
214
+
215
+ <input type="text" size="5" placeholder="攻撃" name="kAtt_d">
216
+
217
+ <input type="text" size="5" placeholder="防御" name="kDef_d">
218
+
219
+ <input type="text" size="5" placeholder="特攻" name="kSatt_d">
220
+
221
+ <input type="text" size="5" placeholder="特防" name="kSdef_d">
222
+
223
+ <input type="text" size="5" placeholder="素早" name="kQui_d">
224
+
225
+ <br>
226
+
227
+ <h3>努力値</h3>
228
+
229
+ <input type="text" size="5" placeholder="HP" name="eHP_d">
230
+
231
+ <input type="text" size="5" placeholder="攻撃" name="eAtt_d">
232
+
233
+ <input type="text" size="5" placeholder="防御" name="eDef_d">
234
+
235
+ <input type="text" size="5" placeholder="特攻" name="eSatt_d">
236
+
237
+ <input type="text" size="5" placeholder="特防" name="eSdef_d">
238
+
239
+ <input type="text" size="5" placeholder="素早" name="eQui_d">
240
+
241
+ <br>
242
+
243
+ <div class="form-group">
244
+
245
+ <h3>わざ</h3>
246
+
247
+ <ul class="list-inline">
248
+
249
+ <li><input type="text" name="skill1" class="form-control"></li>
250
+
251
+ <li><input type="text" name="skill2" class="form-control"></li>
252
+
253
+ <li><input type="text" name="skill3" class="form-control"></li>
254
+
255
+ <li><input type="text" name="skill4" class="form-control"></li>
256
+
257
+ </ul><!-- ul要素の終了タグ -->
258
+
259
+ </div>
260
+
261
+
262
+
263
+ <div class="form-group">
264
+
265
+ <label for="name" class="control-label col-sm-4">メモ:</label>
266
+
267
+ <div class="col-sm-4">
268
+
269
+ <textarea name="memo" id="name" class="form-control" cols="3" rows="3"></textarea>
270
+
271
+ </div>
272
+
273
+ </div>
274
+
275
+
276
+
277
+ <br>
278
+
279
+ <input type="reset" class="button" value="リセット">
280
+
281
+ <input type="submit" class="button" value="送信">
282
+
283
+ </center>
284
+
285
+ </form>
286
+
287
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
288
+
289
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
290
+
291
+ </body>
292
+
293
+ </html>
294
+
295
+ ```