質問編集履歴
1
コードが別のページになっていたので図のコードに修正を行いました
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
縮小した時に文字を中央固定・下側の空白を無く
|
1
|
+
縮小した時にサイドバーの文字を中央固定・下側の空白を無くしたい
|
body
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
|
3
3
|
ここに質問の内容を詳しく書いてください。
|
4
4
|
現在HTML5・JQUERY・bootstrapを活用して本の貸し出しシステムを作っています。
|
5
|
+
・縮小した時に図2の下側の空白をけしたい
|
5
|
-
|
6
|
+
.縮小した時にサイドバーの文字を黒色の部分の真ん中に配置したい
|
7
|
+
上記の二点をbootstrapを用いて解決したいです
|
6
8
|
図1
|
7
9
|
図2
|
8
10
|
|
9
11
|
### 発生している問題・エラーメッセージ
|
10
12
|
|
11
13
|
```
|
12
|
-
通常画面(図1:縮尺100%)の場合は想定通りの表示になりますが
|
13
14
|
縮尺を小さくすると
|
14
15
|
問題点1・左側のAll等の配置が左に寄ってしまう(中央に配置したい)
|
15
16
|
問題点2・下側に謎の空白ができてしまう(空白をなくしたい)
|
@@ -24,181 +25,100 @@
|
|
24
25
|
<meta charset="UTF-8">
|
25
26
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
26
27
|
<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">
|
28
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
29
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet" />
|
30
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
|
27
31
|
<title>Document</title>
|
28
32
|
</head>
|
29
|
-
<body>
|
33
|
+
<body style="margin-bottom:-100px" >
|
30
|
-
<div class="container-fluid" style="background-color: #eeeeee">
|
34
|
+
<div class="container-fluid h-100" style="background-color: #eeeeee">
|
31
|
-
<div class="row">
|
35
|
+
<div class="row h-100 ">
|
32
36
|
<!--サイドメニュー-->
|
33
37
|
<div class="col-sm-2" style="background-color:#4d4d4d;">
|
34
|
-
<div class="position-fixed" style="margin-left:
|
38
|
+
<div class="position-fixed " style="margin-left: 35px;">
|
35
|
-
<a href="#" class="text-center" style="margin-bottom:30px; margin-top: 70px; display:block; color:white; font-size: 30px; width: auto;">All</a>
|
39
|
+
<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>
|
36
40
|
<br>
|
37
41
|
<a href="#" class="text-center" style="margin-bottom:30px; display:block; color:white; font-size: 30px; width: 100%;">Borrow</a>
|
38
42
|
<br>
|
39
43
|
<a href="#" class="text-center" style="margin-bottom:30px; display:block; color:white; font-size: 30px; width: 100%;">Over</a>
|
40
44
|
<br>
|
41
|
-
<a href="file:///C:/Users/ogawa/Desktop/portbook/
|
45
|
+
<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>
|
42
46
|
</div>
|
43
47
|
</div>
|
44
48
|
<!--/サイドメニュー-->
|
45
49
|
<!--メインコンテンツ-->
|
46
50
|
<div class="col-sm-10">
|
51
|
+
<div class="text-center strong" style="margin-top: 80px; margin-bottom: 58px;" id="warning"><入力項目></div>
|
47
|
-
|
52
|
+
<form class="text-center">
|
48
|
-
|
53
|
+
<div class="form-group row">
|
54
|
+
<label for="isbn" class="col-sm-3 col-form-label">ISBN</label>
|
49
|
-
|
55
|
+
<div class="input-group col-sm-6" style="margin-bottom: 30px;">
|
50
|
-
|
56
|
+
<input type="text" class="form-control" id="isbn" placeholder="12345678910">
|
51
|
-
|
57
|
+
<button class="btn btn-default btn-primary" type="submit" id="getBookInfo">Search</button>
|
58
|
+
</div>
|
52
59
|
</div>
|
60
|
+
<div class="form-group row">
|
61
|
+
<label for="title" class="col-sm-3 col-form-label">タイトル</label>
|
62
|
+
<div class="col-sm-6" style="margin-bottom: 30px;">
|
63
|
+
<input type="text" class="form-control" id="title" placeholder="本の借り方" value="">
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<div class="form-group row">
|
67
|
+
<label for="author" class="col-sm-3 col-form-label">著者</label>
|
68
|
+
<div class="col-sm-6" style="margin-bottom: 30px;">
|
69
|
+
<input type="text" class="form-control" id="author"placeholder="本借男" value="">
|
70
|
+
</div>
|
71
|
+
</div>
|
72
|
+
<div class="form-group row">
|
73
|
+
<label for="genre" class="col-sm-3 col-form-label">ジャンル</label>
|
74
|
+
<div class="col-sm-6" style="margin-bottom: 30px;">
|
75
|
+
<select type="text" class="form-control" id="genre" placeholder="文芸,実用,ビジネス・経済・経営,児童書・学参,専門書,その他" value="">
|
76
|
+
<option value="1">文芸</option>
|
77
|
+
<option value="2" selected="selected">実用</option>
|
78
|
+
<option value="3">ビジネス・経済・経営</option>
|
79
|
+
<option value="4">児童書・学参</option>
|
80
|
+
<option value="5">専門書</option>
|
81
|
+
<option value="6">その他</option>
|
82
|
+
</select>
|
83
|
+
</div>
|
84
|
+
</div>
|
85
|
+
<div class="form-group row">
|
86
|
+
<label for="publisher" class="col-sm-3 col-form-label">出版社</label>
|
87
|
+
<div class="col-sm-6" style="margin-bottom: 30px;">
|
88
|
+
<input type="text" class="form-control" id="publisher" placeholder="集英社" value="">
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
<div class="form-group row">
|
92
|
+
<label for="image-url" class="col-sm-3 col-form-label">画像URL</label>
|
93
|
+
<div class="col-sm-6" style="margin-bottom: 20px;">
|
94
|
+
<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="">
|
95
|
+
<!-- todo:画像を表示 -->
|
96
|
+
<div src="" id= "thumbnail" class="mx-auto" style="margin-top: 50px; width: 240px; height: 310px;"></div>
|
97
|
+
<img src="no_image.jpg" style="margin-top: -300px; width: 240px; height: 310px;" id="no-image"/>
|
98
|
+
<!-- /todo:画像を表示 -->
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
<div class="form-group row">
|
102
|
+
<label for="description" class="col-sm-3 col-form-label">書籍の説明</label>
|
103
|
+
<div class="col-sm-6" style="margin-bottom: 30px;">
|
104
|
+
<textarea class="form-control" id="description" rows="4" value=""></textarea>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
<div class="text-center">
|
108
|
+
<button type="submit" class="btn btn-primary " style="margin-bottom: 50px;">書籍を追加</button>
|
109
|
+
</div>
|
110
|
+
</form>
|
111
|
+
<!--/メインコンテンツ-->
|
53
112
|
</div>
|
54
|
-
<!--/検索バー-->
|
55
|
-
<nav aria-label="...">
|
56
|
-
<div class="mx-auto" style="width: 200px; padding-top: 20px;">
|
57
|
-
<ul class="pagination">
|
58
|
-
<li class="page-item">
|
59
|
-
<a class="page-link" href="#" aria-label="前">
|
60
|
-
<span aria-hidden="true">«</span>
|
61
|
-
</a>
|
62
|
-
</li>
|
63
|
-
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
64
|
-
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
65
|
-
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
66
|
-
<li class="page-item"><a class="page-link" href="#">4</a></li>
|
67
|
-
<li class="page-item"><a class="page-link" href="#">5</a></li>
|
68
|
-
<li class="page-item">
|
69
|
-
<a class="page-link" href="#" aria-label="次">
|
70
|
-
<span aria-hidden="true">»</span>
|
71
|
-
</a>
|
72
|
-
</li>
|
73
|
-
</ul>
|
74
|
-
</div>
|
75
|
-
</nav>
|
76
|
-
<!--送りページ上に書く-->
|
77
|
-
<div class="row">
|
78
|
-
<div class="text-center" style="width: 50%;">
|
79
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
80
|
-
<br>
|
81
|
-
<button type="button" class="btn btn-danger text-dark" style="width: 240px; margin-bottom: 15Px;">return</button>
|
82
|
-
</div>
|
83
|
-
<div class="text-center" style="width: 50%;">
|
84
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
85
|
-
<br>
|
86
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
87
|
-
</div>
|
88
|
-
<div class="text-center" style="width: 50%;">
|
89
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
90
|
-
<br>
|
91
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
92
|
-
</div>
|
93
|
-
<div class="text-center" style="width: 50%;">
|
94
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
95
|
-
<br>
|
96
|
-
<button type="button" class="btn btn-danger text-dark" style="width: 240px; margin-bottom: 15Px">return</button>
|
97
|
-
</div>
|
98
|
-
<div class="text-center" style="width: 50%;">
|
99
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
100
|
-
<br>
|
101
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
102
|
-
</div>
|
103
|
-
<div class="text-center" style="width: 50%;">
|
104
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
105
|
-
<br>
|
106
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
107
|
-
</div>
|
108
|
-
<div class="text-center" style="width: 50%;">
|
109
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
110
|
-
<br>
|
111
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
112
|
-
</div>
|
113
|
-
<div class="text-center" style="width: 50%;">
|
114
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
115
|
-
<br>
|
116
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
117
|
-
</div>
|
118
|
-
<div class="text-center" style="width: 50%;">
|
119
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
120
|
-
<br>
|
121
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
122
|
-
</div>
|
123
|
-
<div class="text-center" style="width: 50%;">
|
124
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
125
|
-
<br>
|
126
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
127
|
-
</div>
|
128
|
-
<div class="text-center" style="width: 50%;">
|
129
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
130
|
-
<br>
|
131
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
132
|
-
</div>
|
133
|
-
<div class="text-center" style="width: 50%;">
|
134
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
135
|
-
<br>
|
136
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
137
|
-
</div>
|
138
|
-
<div class="text-center" style="width: 50%;">
|
139
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
140
|
-
<br>
|
141
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
142
|
-
</div>
|
143
|
-
<div class="text-center" style="width: 50%;">
|
144
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
145
|
-
<br>
|
146
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
147
|
-
</div>
|
148
|
-
<div class="text-center" style="width: 50%;">
|
149
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
150
|
-
<br>
|
151
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
152
|
-
</div>
|
153
|
-
<div class="text-center" style="width: 50%;">
|
154
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
155
|
-
<br>
|
156
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
157
|
-
</div>
|
158
|
-
<div class="text-center" style="width: 50%;">
|
159
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
160
|
-
<br>
|
161
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
162
|
-
</div>
|
163
|
-
<div class="text-center" style="width: 50%;">
|
164
|
-
<img src="no_image.jpg" style="width: 240px; height: 310px;">
|
165
|
-
<br>
|
166
|
-
<button type="button" class="btn btn-primary text-dark" style="width: 240px; margin-bottom: 15Px">rental</button>
|
167
|
-
</div>
|
168
|
-
</div>
|
169
|
-
<!--送りページ下に書く-->
|
170
|
-
<nav aria-label="...">
|
171
|
-
<div class="mx-auto" style="width: 200px;">
|
172
|
-
<ul class="pagination">
|
173
|
-
<li class="page-item">
|
174
|
-
<a class="page-link" href="#" aria-label="前">
|
175
|
-
<span aria-hidden="true">«</span>
|
176
|
-
</a>
|
177
|
-
</li>
|
178
|
-
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
179
|
-
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
180
|
-
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
181
|
-
<li class="page-item"><a class="page-link" href="#">4</a></li>
|
182
|
-
<li class="page-item"><a class="page-link" href="#">5</a></li>
|
183
|
-
<li class="page-item">
|
184
|
-
<a class="page-link" href="#" aria-label="次">
|
185
|
-
<span aria-hidden="true">»</span>
|
186
|
-
</a>
|
187
|
-
</li>
|
188
|
-
</ul>
|
189
|
-
</div>
|
190
|
-
</nav>
|
191
|
-
</div>
|
192
|
-
<!--/メインコンテンツ-->
|
193
113
|
</div>
|
194
114
|
</div>
|
115
|
+
|
195
116
|
</body>
|
196
|
-
</html>
|
117
|
+
</html>
|
197
118
|
```
|
198
119
|
|
199
120
|
### 試したこと
|
200
121
|
問題点1・text-centerを行なっているが中央に寄らない
|
201
122
|
問題点2・レスポンシブによるものだと考えたが検索能力が低く答えを導き出せません
|
202
123
|
### 補足情報(FW/ツールのバージョンなど)
|
203
|
-
|
204
|
-
|
124
|
+
bootstrapは最新バージョンで行っています。
|