質問編集履歴

1

コードが別のページになっていたので図のコードに修正を行いました

2020/06/23 14:55

投稿

ogawa14041
ogawa14041

スコア1

test CHANGED
@@ -1 +1 @@
1
- 縮小した時に文字を中央固定・下側の空白を無く
1
+ 縮小した時にサイドバーの文字を中央固定・下側の空白を無くしたい
test CHANGED
@@ -6,7 +6,11 @@
6
6
 
7
7
  現在HTML5・JQUERY・bootstrapを活用して本の貸し出しシステムを作っています。
8
8
 
9
+ ・縮小した時に図2の下側の空白をけしたい
10
+
9
- 固定サイドバーの機能実装中に以下の問題点が発生まし
11
+ .縮小した時にサイドバーの文字黒色の部分の真ん中に配置した
12
+
13
+ 上記の二点をbootstrapを用いて解決したいです
10
14
 
11
15
  ![イメージ説明](acb1e17c3fb958638a52cdffec88c581.jpeg)図1
12
16
 
@@ -20,8 +24,6 @@
20
24
 
21
25
  ```
22
26
 
23
- 通常画面(図1:縮尺100%)の場合は想定通りの表示になりますが
24
-
25
27
  縮尺を小さくすると
26
28
 
27
29
  問題点1・左側のAll等の配置が左に寄ってしまう(中央に配置したい)
@@ -50,23 +52,29 @@
50
52
 
51
53
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
52
54
 
55
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
56
+
57
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet" />
58
+
59
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
60
+
53
61
  <title>Document</title>
54
62
 
55
63
  </head>
56
64
 
57
- <body>
65
+ <body style="margin-bottom:-100px" >
58
-
66
+
59
- <div class="container-fluid" style="background-color: #eeeeee">
67
+ <div class="container-fluid h-100" style="background-color: #eeeeee">
60
-
68
+
61
- <div class="row">
69
+ <div class="row h-100 ">
62
70
 
63
71
  <!--サイドメニュー-->
64
72
 
65
73
  <div class="col-sm-2" style="background-color:#4d4d4d;">
66
74
 
67
- <div class="position-fixed" style="margin-left: 40px;">
75
+ <div class="position-fixed " style="margin-left: 35px;">
68
-
76
+
69
- <a href="#" class="text-center" style="margin-bottom:30px; margin-top: 70px; display:block; color:white; font-size: 30px; width: auto;">All</a>
77
+ <a href="#" class="text-center" style="margin-bottom:30px; margin-top: 70px; display:block; color:white; font-size: 30px; width: auto;" id="All">All</a>
70
78
 
71
79
  <br>
72
80
 
@@ -78,7 +86,7 @@
78
86
 
79
87
  <br>
80
88
 
81
- <a href="file:///C:/Users/ogawa/Desktop/portbook/management.html"><button class="btn-outline-info" style="margin-top:60px; display:block; font-size: 30px; width: auto;">CREATE</button></a>
89
+ <a href="file:///C:/Users/ogawa/Desktop/portbook/index.html"><button class="btn-outline-info" style="margin-top:150px; display:block; font-size: 30px; width: auto;">RETURN</button></a>
82
90
 
83
91
  </div>
84
92
 
@@ -90,305 +98,139 @@
90
98
 
91
99
  <div class="col-sm-10">
92
100
 
93
- <!--検索バー-->
94
-
95
- <div class="col-sm-8 mx-auto">
96
-
97
- <div class="input-group" style="margin-top: 20px; ">
98
-
99
- <input type="text" class="form-control">
100
-
101
- <button class="btn btn-default btn-primary" type="submit">Search</button>
102
-
103
- </div>
101
+ <div class="text-center strong" style="margin-top: 80px; margin-bottom: 58px;" id="warning"><入力項目></div>
102
+
103
+ <form class="text-center">
104
+
105
+ <div class="form-group row">
106
+
107
+ <label for="isbn" class="col-sm-3 col-form-label">ISBN</label>
108
+
109
+ <div class="input-group col-sm-6" style="margin-bottom: 30px;">
110
+
111
+ <input type="text" class="form-control" id="isbn" placeholder="12345678910">
112
+
113
+ <button class="btn btn-default btn-primary" type="submit" id="getBookInfo">Search</button>
114
+
115
+ </div>
116
+
117
+ </div>
118
+
119
+ <div class="form-group row">
120
+
121
+ <label for="title" class="col-sm-3 col-form-label">タイトル</label>
122
+
123
+ <div class="col-sm-6" style="margin-bottom: 30px;">
124
+
125
+ <input type="text" class="form-control" id="title" placeholder="本の借り方" value="">
126
+
127
+ </div>
128
+
129
+ </div>
130
+
131
+ <div class="form-group row">
132
+
133
+ <label for="author" class="col-sm-3 col-form-label">著者</label>
134
+
135
+ <div class="col-sm-6" style="margin-bottom: 30px;">
136
+
137
+ <input type="text" class="form-control" id="author"placeholder="本借男" value="">
138
+
139
+ </div>
140
+
141
+ </div>
142
+
143
+ <div class="form-group row">
144
+
145
+ <label for="genre" class="col-sm-3 col-form-label">ジャンル</label>
146
+
147
+ <div class="col-sm-6" style="margin-bottom: 30px;">
148
+
149
+ <select type="text" class="form-control" id="genre" placeholder="文芸,実用,ビジネス・経済・経営,児童書・学参,専門書,その他" value="">
150
+
151
+ <option value="1">文芸</option>
152
+
153
+ <option value="2" selected="selected">実用</option>
154
+
155
+ <option value="3">ビジネス・経済・経営</option>
156
+
157
+ <option value="4">児童書・学参</option>
158
+
159
+ <option value="5">専門書</option>
160
+
161
+ <option value="6">その他</option>
162
+
163
+ </select>
164
+
165
+ </div>
166
+
167
+ </div>
168
+
169
+ <div class="form-group row">
170
+
171
+ <label for="publisher" class="col-sm-3 col-form-label">出版社</label>
172
+
173
+ <div class="col-sm-6" style="margin-bottom: 30px;">
174
+
175
+ <input type="text" class="form-control" id="publisher" placeholder="集英社" value="">
176
+
177
+ </div>
178
+
179
+ </div>
180
+
181
+ <div class="form-group row">
182
+
183
+ <label for="image-url" class="col-sm-3 col-form-label">画像URL</label>
184
+
185
+ <div class="col-sm-6" style="margin-bottom: 20px;">
186
+
187
+ <input type="text" class="form-control" id="image-url" placeholder="https://search.yahoo.co.jp/image/search?ei=UTF-8&p=%E6%96%87%E9%83%A8%E7%A7%91%E5%AD%A6%E7%9C%81&fr=mcafeess1" value="">
188
+
189
+ <!-- todo:画像を表示 -->
190
+
191
+ <div src="" id= "thumbnail" class="mx-auto" style="margin-top: 50px; width: 240px; height: 310px;"></div>
192
+
193
+ <img src="no_image.jpg" style="margin-top: -300px; width: 240px; height: 310px;" id="no-image"/>
194
+
195
+ <!-- /todo:画像を表示 -->
196
+
197
+ </div>
198
+
199
+ </div>
200
+
201
+ <div class="form-group row">
202
+
203
+ <label for="description" class="col-sm-3 col-form-label">書籍の説明</label>
204
+
205
+ <div class="col-sm-6" style="margin-bottom: 30px;">
206
+
207
+ <textarea class="form-control" id="description" rows="4" value=""></textarea>
208
+
209
+ </div>
210
+
211
+ </div>
212
+
213
+ <div class="text-center">
214
+
215
+ <button type="submit" class="btn btn-primary " style="margin-bottom: 50px;">書籍を追加</button>
216
+
217
+ </div>
218
+
219
+ </form>
220
+
221
+ <!--/メインコンテンツ-->
104
222
 
105
223
  </div>
106
224
 
107
- <!--/検索バー-->
108
-
109
- <nav aria-label="...">
110
-
111
- <div class="mx-auto" style="width: 200px; padding-top: 20px;">
112
-
113
- <ul class="pagination">
114
-
115
- <li class="page-item">
116
-
117
- <a class="page-link" href="#" aria-label="前">
118
-
119
- <span aria-hidden="true">&laquo;</span>
120
-
121
- </a>
122
-
123
- </li>
124
-
125
- <li class="page-item"><a class="page-link" href="#">1</a></li>
126
-
127
- <li class="page-item"><a class="page-link" href="#">2</a></li>
128
-
129
- <li class="page-item"><a class="page-link" href="#">3</a></li>
130
-
131
- <li class="page-item"><a class="page-link" href="#">4</a></li>
132
-
133
- <li class="page-item"><a class="page-link" href="#">5</a></li>
134
-
135
- <li class="page-item">
136
-
137
- <a class="page-link" href="#" aria-label="次">
138
-
139
- <span aria-hidden="true">&raquo;</span>
140
-
141
- </a>
142
-
143
- </li>
144
-
145
- </ul>
146
-
147
- </div>
148
-
149
- </nav>
150
-
151
- <!--送りページ上に書く-->
152
-
153
- <div class="row">
154
-
155
- <div class="text-center" style="width: 50%;">
156
-
157
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
158
-
159
- <br>
160
-
161
- <button type="button" class="btn btn-danger text-dark" style="width: 240px; margin-bottom: 15Px;">return</button>
162
-
163
- </div>
164
-
165
- <div class="text-center" style="width: 50%;">
166
-
167
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
168
-
169
- <br>
170
-
171
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
172
-
173
- </div>
174
-
175
- <div class="text-center" style="width: 50%;">
176
-
177
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
178
-
179
- <br>
180
-
181
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
182
-
183
- </div>
184
-
185
- <div class="text-center" style="width: 50%;">
186
-
187
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
188
-
189
- <br>
190
-
191
- <button type="button" class="btn btn-danger text-dark" style="width: 240px; margin-bottom: 15Px">return</button>
192
-
193
- </div>
194
-
195
- <div class="text-center" style="width: 50%;">
196
-
197
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
198
-
199
- <br>
200
-
201
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
202
-
203
- </div>
204
-
205
- <div class="text-center" style="width: 50%;">
206
-
207
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
208
-
209
- <br>
210
-
211
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
212
-
213
- </div>
214
-
215
- <div class="text-center" style="width: 50%;">
216
-
217
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
218
-
219
- <br>
220
-
221
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
222
-
223
- </div>
224
-
225
- <div class="text-center" style="width: 50%;">
226
-
227
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
228
-
229
- <br>
230
-
231
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
232
-
233
- </div>
234
-
235
- <div class="text-center" style="width: 50%;">
236
-
237
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
238
-
239
- <br>
240
-
241
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
242
-
243
- </div>
244
-
245
- <div class="text-center" style="width: 50%;">
246
-
247
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
248
-
249
- <br>
250
-
251
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
252
-
253
- </div>
254
-
255
- <div class="text-center" style="width: 50%;">
256
-
257
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
258
-
259
- <br>
260
-
261
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
262
-
263
- </div>
264
-
265
- <div class="text-center" style="width: 50%;">
266
-
267
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
268
-
269
- <br>
270
-
271
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
272
-
273
- </div>
274
-
275
- <div class="text-center" style="width: 50%;">
276
-
277
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
278
-
279
- <br>
280
-
281
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
282
-
283
- </div>
284
-
285
- <div class="text-center" style="width: 50%;">
286
-
287
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
288
-
289
- <br>
290
-
291
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
292
-
293
- </div>
294
-
295
- <div class="text-center" style="width: 50%;">
296
-
297
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
298
-
299
- <br>
300
-
301
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
302
-
303
- </div>
304
-
305
- <div class="text-center" style="width: 50%;">
306
-
307
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
308
-
309
- <br>
310
-
311
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
312
-
313
- </div>
314
-
315
- <div class="text-center" style="width: 50%;">
316
-
317
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
318
-
319
- <br>
320
-
321
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
322
-
323
- </div>
324
-
325
- <div class="text-center" style="width: 50%;">
326
-
327
- <img src="no_image.jpg" style="width: 240px; height: 310px;">
328
-
329
- <br>
330
-
331
- <button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
332
-
333
- </div>
334
-
335
- </div>
336
-
337
- <!--送りページ下に書く-->
338
-
339
- <nav aria-label="...">
340
-
341
- <div class="mx-auto" style="width: 200px;">
342
-
343
- <ul class="pagination">
344
-
345
- <li class="page-item">
346
-
347
- <a class="page-link" href="#" aria-label="前">
348
-
349
- <span aria-hidden="true">&laquo;</span>
350
-
351
- </a>
352
-
353
- </li>
354
-
355
- <li class="page-item"><a class="page-link" href="#">1</a></li>
356
-
357
- <li class="page-item"><a class="page-link" href="#">2</a></li>
358
-
359
- <li class="page-item"><a class="page-link" href="#">3</a></li>
360
-
361
- <li class="page-item"><a class="page-link" href="#">4</a></li>
362
-
363
- <li class="page-item"><a class="page-link" href="#">5</a></li>
364
-
365
- <li class="page-item">
366
-
367
- <a class="page-link" href="#" aria-label="次">
368
-
369
- <span aria-hidden="true">&raquo;</span>
370
-
371
- </a>
372
-
373
- </li>
374
-
375
- </ul>
376
-
377
- </div>
378
-
379
- </nav>
380
-
381
- </div>
382
-
383
- <!--/メインコンテンツ-->
384
-
385
225
  </div>
386
226
 
387
227
  </div>
388
228
 
229
+
230
+
389
231
  </body>
390
232
 
391
- </html>
233
+ </html>
392
234
 
393
235
  ```
394
236
 
@@ -402,6 +244,4 @@
402
244
 
403
245
  ### 補足情報(FW/ツールのバージョンなど)
404
246
 
405
-
406
-
407
- ここにより詳細な情報を記載しください。
247
+ bootstrapは最新バージョンで行っています