質問するログイン新規登録

質問編集履歴

2

ページ全体のhtmlとcssのコードを追加しました

2020/11/09 23:31

投稿

haru829
haru829

スコア0

title CHANGED
File without changes
body CHANGED
@@ -1,15 +1,20 @@
1
- ハンバーガーメニューを作成し、画面を小さくすると、メニューが出てきません。
2
- 余白部分(ページ全体)にハンバーガーメニューがあるときはメニューがでるのですが、
1
+ ハンバーガーメニューを作成し、画面を小さくすると、メニューが出てきません。余白部分(ページ全体)にハンバーガーメニューがあるときはメニューがでるのですが、小さくして本文にかかる大きさになると、クリックしてもメニューが出ません。
3
- 小さくして本文にかかる大きさになると、クリックしてもメニューが出ません。
4
- どうかご教授お願い致します。
2
+ どうかご教授お願い致します。  追記― まだ制作途中の段階のコードになります。
5
3
 
6
- #
7
-
8
4
  ### 該当のソースコード
9
5
 
10
6
  html
11
7
  ```
8
+ <body style="color:#548989; background-color:#f5f5dc;" link="#666666" vlink="#666666" alink="#1b9dc9">
9
+ <div class="container ">
10
+ <div class="row">
11
+ <div class="col-12 m-0 p-0 ">
12
+      <header div id="pagehead" >
13
+ <div class="row">
14
+ <div class="col-1 m-0 p-0">
15
+ <a div class="title" href="HP-2020/index.html" >
16
+ <img src="images/top/top-rogo.gif" alt="秋田県湯沢市の良質な家システムハウス篠建"></a></div>
12
- <div id="nav-drawer">
17
+ <div id="nav-drawer">
13
18
  <input id="nav-input" type="checkbox" class="nav-unshown">
14
19
  <label id="nav-open" for="nav-input"><span></span></label>
15
20
  <label class="nav-unshown" id="nav-close" for="nav-input"></label>
@@ -19,29 +24,137 @@
19
24
  <li><a href="company.html">篠建について</a></li>
20
25
  <li><a href="message.html">篠建からのメッセージ</a></li>
21
26
  <li><a href="office.html">事務所へよってたんせ</a></li>
22
-
23
- <a color="#99cc99" font-weight="bold">良質な家</a>
27
+        <a color="#99cc99" font-weight="bold">良質な家</a>
24
-
25
- <li><a color="#99cc99" >3つの施工法</a></li>
28
+      <li><a color="#99cc99" >3つの施工法</a></li>
26
29
  <li><a href="hot-life.html">ほっとライフの家</a></li>
27
30
  <li><a href="fw.html">フレームウォール工法</a></li>
28
31
  <li><a href="zairai.html">在来工法</a></li>
29
32
  <li><a href="nagare.html">家造りの流れ</a></li>
30
-
33
+ </div></div>
34
+ <div class="col-11 m-0 p-0">
35
+ <div class="header-right">
36
+ <ul class="icon">
37
+ <li class="web"><a href="https://www.youtube.com/channel/UCS2AysYSrfbLRjiEFyY8f2w" target="_blank">
38
+ <img src="images/top/web_a1.gif" alt="web内覧会" aria-hidden="true"></i></a></li>
39
+ <li class="mail"><a href="mailto:info@shinoken-sys.jp">
40
+ <img src="images/top/mail_a1.gif" width="80" height="80" border="0" alt="メール" aria-hidden="true"></i></a></li>
41
+ <li class="blog"><a href="https://weloffice.exblog.jp/" target="_blank">
42
+ <img src="images/top/blog_a1.gif" width="80" height="80" border="0" alt="ブログ"aria-hidden="true"></i></a></li>
43
+ <li class="add"><a div style=" color:#696969" >秋田県湯沢市千石町3-6-8<br>TEL 0183-72-2661<br>FAX 0183-72-4186</div></a></div></li>
44
+ </ul>
45
+ </div></div>
46
+ </div>
47
+ </header>
48
+ <nav class="menu" >
49
+ <li><a href="HP-2020/index.html">HOME</a></li>
50
+ <li><a href="#">ようこそ篠建へ</a>
51
+ <ul>
52
+ <li><a href="company.html">篠建について</a></li>
53
+ <li><a href="message.html">篠建からのメッセージ</a></li>
54
+ <li><a href="office.html">事務所へよってたんせ</a></li>
55
+ </ul>
56
+ </li>
57
+ <li><a href="#">良質な家</a>
58
+ <ul class="sub">
31
- <a color="#99cc99" font-weight="bold">家造りお得情報</a>
59
+ <li><a href="#">3つ施工法 ≫</a>
60
+ <ul>
32
- <li><a href="house-otoku.html">新築住宅お得情報</a></li>
61
+ <li><a href="hot-life.html">ほっとライフ</a></li>
33
- <li><a href="reform-otoku.html">ームのお得情報</a></li>
62
+ <li><a href="fw.html">フームウォール工法</a></li>
63
+ <li><a href="zairai.html">在来工法</a></li>
64
+ </ul>
65
+ </li>
34
- <li><a href="yuushi.html">ご融資借入機関</a></li>
66
+ <li><a href="nagare.html">家造り流れ</a></li>
67
+ </ul>
68
+ </li>
69
+ </nav></div></div></div></div>
70
+ <div class="container">
71
+ <div class="row">
72
+ <div class="col-sm-12 col-md-12 col-lg-9 mt-2 p-1">
73
+ <h3 align="center" style="color:#1b9dc9; background-color:#78d68f;>
74
+ <h3 style="text-align:left;" align="left"><font color="#ffffff" backgrund-color="#669966">事務所によってたんせ</font></h3>
75
+     <div class="row">
76
+ <div class="col-sm-12 col-md-6 col-lg-6 m-0.5"><img src="images/office/cat.jpg"></div>
77
+ </div>
78
+ </div>
79
+   <div class="col-sm-12 col-md-12 col-lg-3 m-0 p-0">
80
+ <aside>
81
+ <ul class="icon10">
82
+ <div class="col-12 ">
83
+ <li class="new"><p>シノケンNEWS</p><a href="index.html" >
84
+ 新着情報はこちら</a></li></div><br>
85
+ <div class="col-sm-6 col-md-4 col-lg-12 m-0 p-0">
86
+ <li class="DIY"><a href="diy.html" >
87
+ <img src="images/sub/diy-b1.gif" width="185" height="120" border="0" alt="メンテピット・仮設物置DIYキット"></a></li></div>
88
+ </div></div></ul></aside>
89
+ </div>
90
+ </div></div>
91
+ </div>
92
+ </div></div></div>
93
+ </body>
35
94
 
36
- <a color="#99cc99" font-weight="bold" >お客様の部屋</a>
37
- <li><a href="voice.html">お客様の声</a></li>
38
- <li><a href="agatte.html">あがってたんせ</a></li>
39
- <li><a href="link.html">リンク</a></li>
40
- </div></div>
41
-
42
95
  ```
43
96
  css
44
97
  ```
98
+ nav.menu {
99
+ margin: 0px ;
100
+ padding: 0px 5px 0px 20x;
101
+ background-color: #339966;
102
+ text-align:center;
103
+ }
104
+ nav.menu li {
105
+ width: 18%;
106
+ display: inline-block;
107
+ list-style-type: none;
108
+ position: relative;
109
+  font-weight: normal;
110
+ nav.menu a {
111
+ background-color: #339966;
112
+ color: white;
113
+ line-height: 40px;
114
+ text-align: center;
115
+ text-decoration: none;
116
+ font-weight: bold;
117
+ display: block;
118
+ }
119
+ nav.menu a:hover {
120
+ background-color: #99cc99;
121
+ color: #696969;
122
+  font-weight: normal;
123
+ }
124
+
125
+ nav.menu li:hover > ul {
126
+ display: block;
127
+ }
128
+ nav.menu ul {
129
+ margin: 0px;
130
+ padding: 0px;
131
+ display: none;
132
+ position: absolute;
133
+ z-index: 1000;
134
+ }
135
+ nav.menu ul li {
136
+ width: 100%;
137
+ border-top: 1px solid white;
138
+ }
139
+ nav.menu ul li a {
140
+ line-height: 35px;
141
+ text-align: center;
142
+ padding-left: 5px;
143
+ font-weight: normal;
144
+ }
145
+ nav.menu ul li a:hover {
146
+ background-color: #99cc99;
147
+ color: #696969;
148
+ }
149
+ nav.menu ul ul {
150
+ width: 100%;
151
+ margin: 0px;
152
+ padding: 0px;
153
+ display: none;
154
+ position: absolute;
155
+ top: 10px;
156
+ left: 100%;
157
+ border-left: 1px solid white;
45
158
  @media screen and (min-width:1024px) {
46
159
  #nav-drawer {
47
160
  display:none;
@@ -56,29 +169,23 @@
56
169
  float:right;
57
170
  list-style-type: none;
58
171
  }
59
-
60
- /*チェックボックス等は非表示に*/
61
172
  .nav-unshown {
62
173
  display:none;
63
174
  }
64
-
65
- /*アイコンのスペース*/
66
175
  #nav-open {
67
- display: inline-block;
176
+ display: inline-block ;
68
- width: auto;
177
+ width: 30px;
69
178
  height: 22px;
70
179
  vertical-align: middle;
71
- position: fixed;
180
+ position: fixed ;
72
181
  top: 25px;
73
182
  right:40px;
74
183
  padding-right:0,auto;
75
184
  }
76
-
77
- /*ハンバーガーアイコンをCSSだけで表現*/
78
185
  #nav-open span, #nav-open span:before, #nav-open span:after {
79
186
  position: absolute;
80
- height: 3px;/*線の太さ*/
187
+ height: 3px;
81
- width:30px;/*長さ*/
188
+ width:30px;
82
189
  border-radius: 3px;
83
190
  background: #555;
84
191
  display: block;
@@ -91,13 +198,11 @@
91
198
  #nav-open span:after {
92
199
  bottom: -18px;
93
200
  }
94
-
95
- /*閉じる用の薄黒カバー*/
96
201
  #nav-close {
97
- display: none;/*はじめは隠しておく*/
202
+ display: none;
98
- position: fixed;
203
+ position: fixed ;
99
204
  z-index: 999999;
100
- top: 0;/*全体に広がるように*/
205
+ top: 0;
101
206
  right: 0;
102
207
  width: 100%;
103
208
  height: 100%;
@@ -105,44 +210,208 @@
105
210
  opacity: 0;
106
211
  transition: .3s ease-in-out;
107
212
  }
108
-
109
- /*中身*/
110
213
  #nav-content {
111
214
  overflow: auto;
112
215
  position: fixed;
113
216
  top: 0;
114
217
  right: 0;
115
- z-index: 999999;/*最前面に*/
218
+ z-index: 999999;
116
- width: 45%;/*右側に隙間を作る(閉じるカバーを表示)*/
219
+ width: 45%;
117
- max-width:330px;/*最大幅(調整してください)*/
220
+ max-width:330px;
118
221
  height: 100%;
119
- background: #fff;/*背景色*/
222
+ background: #fff;
120
- transition: .3s ease-in-out;/*滑らかに表示*/
223
+ transition: .3s ease-in-out;
121
224
  -webkit-transform: translateX(105%);
122
- transform: translateX(105%);/*左に隠しておく*/
225
+ transform: translateX(105%);
123
226
  padding:2em;
124
227
  }
125
228
  #nav-content a {
126
229
  text-decoration:none;
127
230
  }
128
- /*チェックが入ったらもろもろ表示*/
129
231
  #nav-input:checked ~ #nav-close {
130
- display: block;/*カバーを表示*/
232
+ display: block !important;
131
233
  opacity: .5;
132
234
  }
133
-
134
235
  #nav-input:checked ~ #nav-content {
135
236
  -webkit-transform: translateX(0%);
136
- transform: translateX(0%);/*中身を表示(右へスライド)*/
237
+ transform: translateX(0%);
137
238
  box-shadow: 6px 0 25px rgba(0,0,0,.15);
138
239
  }
139
240
  }
140
- ```
241
+ body {
242
+ margin: 0,auto;
243
+ }
244
+ .container {
245
+ background-color:#ffffff;
246
+ }
247
+ /* head title  */
248
+ #pagehead {
249
+ height:125px;
250
+ margin: 0 auto;
251
+ padding:0.5em 1.5em;
252
+ }
253
+ @media screen and (max-width:1024px) {
254
+ .title img {
255
+ width:auto;
256
+ margin:0,auto;
257
+ float:left;
258
+ }
259
+ }
260
+ /* title right buttom */
261
+ .header-right {
262
+ width:65%;
263
+ position: absolute;
264
+ top: 1.5em;
265
+ right:0;
266
+ }
267
+ @media screen and (max-width:1024px) {
268
+ .header-right {
269
+ display:none;
270
+ }
271
+ }
272
+ /* icon buttom */
273
+ .icon {
274
+ display: -webkit-flex; /* Safari */
275
+ display: flex;
276
+ list-style-type: none;
277
+ }
278
+ .icon li {
279
+ margin-right: 7px;
280
+ }
281
+ .icon li a :hover {
282
+ opacity:75%;
283
+ }
141
284
 
285
+ .icon li.blog img {
286
+ margin-right:13px;
287
+ }
288
+ /* sabu menu */
289
+ .tag {
142
- ### 試したこと
290
+ margin: 0 auto;
291
+ }
292
+ @media screen and (max-width:1024px) {
293
+ .tag{
143
294
 
295
+ float:left;
296
+ }
297
+ }
298
+ /* icon2 button */
299
+ .icon2 {
144
- position: absolute !important;にしてみたのですが、変化はありませんでした。
300
+ display: -webkit-flex; /* Safari */
301
+ list-style-type: none;
302
+ flex-direction:row;
303
+ flex-wrap:wrap;
304
+ width:95%;
305
+ padding-top:0;
306
+ padding-bottom:1em;
307
+ }
308
+ .icon2 li {
309
+ padding:0em 0.1em;
310
+ }
311
+ .icon2 a :hover {
312
+ opacity:75%;
313
+ }
314
+ . icon2 img {
315
+ margin:0 auto;
316
+ display:block;
317
+ }
145
318
 
319
+ /* ここまで共通 */
320
+ .wrapper {
321
+ float: left;
322
+ margin: 0;
323
+ width: 100%;
324
+ margin-right: -200px;
325
+ background-color:#ffffff;
326
+ }
327
+ .wrapper main {
328
+ margin: 0;
329
+ margin-right: 200px;
330
+ }
331
+ .wrapper aside {
332
+ height: auto;
333
+ width:200px;
334
+ }
335
+ @media screen and (max-width: 1000px) {
336
+ .wrapper ,.wrapper main ,.wrapper aside {
337
+ float: none;
338
+ margin: 0;
339
+ width: 97%;
340
+ }
341
+ .icon10 {
342
+ display: -webkit-flex; /* Safari */
343
+ list-style-type: none;
344
+ flex-direction:row;
345
+ flex-wrap:wrap;
346
+ width:95%;
347
+ padding-top:0;
348
+ padding-bottom:1em;
349
+ }
350
+ }
351
+ ul.icon10 {
352
+ list-style-type: none;
353
+ }
354
+ li.new {
355
+ width:150px;
356
+ height:60px;
357
+ border:solid 1px orange;
358
+ padding:1em 0.5em;
359
+ margin:1em;
360
+ line-height:0.3em;
361
+ text-align:center;
362
+ float: left;
363
+ }
364
+ li.new a {
365
+ text-decoration:none;
366
+ }
367
+ li.kouhou p {
368
+ border-top:solid 1px darkgray;
369
+ text-align:center;
370
+ padding:0.5em;
371
+ width:150px;
372
+ float: left;
373
+ }
374
+ .icon10 a :hover {
375
+ opacity:75%;
376
+ }
377
+ main#photo {
378
+ width:25%;
379
+ padding-left:2em;
380
+ padding-right:3em;
381
+ padding-bottom:3em;
382
+ }
383
+ #photo img {
384
+ margin:0.5em;
385
+ }
386
+ mai#p1 {
387
+ line-height:180%;
388
+ }
389
+ #p1,#p2,#p3,#p4,#p5,#p6 {
390
+ margin-left:2em;
391
+ line-height:180%;
392
+ }
393
+ #p2 h4 {
394
+ padding:0;
395
+ margin:0;
396
+ }
397
+ #p1 h4,#p3 h4,#p4 h4,#p5 h4,#6 h4 {
398
+ padding:0;
399
+ margin:0;
400
+ }
401
+ #p2 p {
402
+ margin-top:0;
403
+ }
146
- ### 補足情報(FW/ツールのバージョンなど)
404
+ #p1 p,#p3 p,#p4 p,#p5 p,#p6 p {
405
+ margin-top:0;
406
+ margin-bottom:2em;
407
+ }
408
+ span {
409
+ display:inline-block;
410
+ width:6em;
411
+ }
412
+ span.wid-8 {
413
+ display:inline-block;
414
+ width:8em;
415
+ }
147
416
 
148
- テラパッドでコードを入れて制作をしています。
417
+ ```

1

初心者メークを付けました

2020/11/09 23:31

投稿

haru829
haru829

スコア0

title CHANGED
File without changes
body CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  ### 該当のソースコード
9
9
 
10
- htmlコード
10
+ html
11
11
  ```
12
12
  <div id="nav-drawer">
13
13
  <input id="nav-input" type="checkbox" class="nav-unshown">
@@ -40,7 +40,7 @@
40
40
  </div></div>
41
41
 
42
42
  ```
43
- cssコード
43
+ css
44
44
  ```
45
45
  @media screen and (min-width:1024px) {
46
46
  #nav-drawer {