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

質問編集履歴

2

footer

2020/09/14 05:58

投稿

tsurutsuru649
tsurutsuru649

スコア2

title CHANGED
@@ -1,1 +1,1 @@
1
- fotter表示について
1
+ footer表示について
body CHANGED
File without changes

1

ご指摘ありがとうございます。問題部分を編集しました。単純なミスもありすみません。ありがとうございます。

2020/09/14 05:58

投稿

tsurutsuru649
tsurutsuru649

スコア2

title CHANGED
File without changes
body CHANGED
@@ -1,121 +1,74 @@
1
- headerとfotterを固定表示にしたいのですが
1
+ ### 前提・実現したいこと
2
- fotterだけうまく表示されません。liかえてみたりしたのですがうまくいきませんでした
2
+ フッターの固定表示をしたのですが手をつくしているのですがなかなかうまく表示されません
3
- 全体のコードがこちら
4
- わかるかたいましたらお教えいただければと思います。
5
3
 
6
- <body>
7
- <!-- header -->
4
+ ### 発生している問題・エラーメッセージ
5
+ 何もない真っ白なフッターになってしまってます。
8
6
 
9
- <header>
7
+ ### 該当のソースコード
10
- <div class ="head">
11
- <div class="text">
8
+ ```ここに言語を入力
12
- <ul>
9
+ <main>
13
- <li> ~...</li>
14
-
15
- </ul>
16
- </div>
10
+ </main>
17
- </div>
18
11
 
19
-
20
- </header>
21
- <div class ="contents-1">
22
- <div class ="top"><h1>TOP</h1>
23
- </div>
24
- <div class ="list">
25
- <ul>
26
- <li>a </li>
27
- <li>b </li>
28
- <li>c </li>
29
- </ul>
30
- </div>
31
- </div>
32
-
33
-
34
- <div class ="contents-2">
35
- </div>
36
-
37
- <fotter>
12
+ <footer>
38
13
  <nav class ="nav-inline" >
39
- <a> ~~...</a>
14
+ <a>etc....</a>
40
15
  </nav>
16
+ </footer>
41
17
 
42
- </fotter>
43
-
44
18
  </body>
45
19
 
46
20
  </html>
47
21
 
48
- <----css----->
22
+ <--------css--------->
49
23
 
50
24
  * {
51
25
  margin:0; padding:0;
52
26
  }
53
27
 
54
-
55
- .head {
28
+ main{
56
- margin:0 auto;
29
+ margin: 0;
57
- width:100%;
30
+ display: flex;
31
+ flex-flow: column;
58
- padding-right: 204px;
32
+ min-height: 100vh;
59
- padding-left:204px;
60
- background-color: brown;
61
- position:fixed;
62
- display:inline-block;
63
-
64
- }
65
- .text li{
66
- padding:20px 24px 20px 20px;
67
- list-style:none;
68
- font-size:16px;
69
- display:inline-block;
70
- color:white;
71
- z-index:2;
72
- text-align:center;
73
- justify-content: space-between;
74
33
  }
75
34
 
76
-
77
- .contents-1{
35
+ footer{
36
+ display:inline-block;
37
+ margin-top:35px;
78
- height:1000px;
38
+ height:44px;
79
39
  width:100%;
80
- background-image:url("image");
81
- background-size:100% 100%;
82
- background-repeat : no-repeat;
83
- margin:0 auto;
84
- z-index: auto;
85
- font-size:100%;
86
40
  }
87
-
88
-
89
- .top{
90
- margin-left:30px;
91
- margin-top:30px;
92
- padding:15px 15px;
93
- position:absolute;
94
- z-index:2;
95
- color:green;
96
- background-color:yellow;
97
- }
98
- .list{
99
- padding:90px;
100
- z-index:2;
101
- }
102
-
103
- fotter nav-inline{
104
- margin-top:35px;
105
- }
106
41
  .nav-inline a{
42
+ width:100%;
107
43
  display:inline-block;
108
44
  text-align:center;
109
45
  justify-content: space-between;
110
46
  font-size:inherit;
111
47
  padding-top: 16px;
112
48
  padding-bottom:20px;
113
- background-color: brown;
114
49
  position:fixed;
115
50
  z-index:2;
51
+
116
52
  }
117
53
 
118
54
  .li{
119
55
  list-style:none;
120
56
 
121
- }
57
+ }
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+ ```
66
+
67
+ ### 試したこと
68
+ <li>から <a>の変更、
69
+
70
+
71
+ height,widhtの指定など…
72
+
73
+ ### 補足情報(FW/ツールのバージョンなど)
74
+ ツール:ATOM