質問編集履歴

1

コード追加しました!

2020/05/12 03:12

投稿

jampan02
jampan02

スコア24

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,149 @@
1
+ ```CSS
2
+
3
+
4
+
5
+ body{
6
+
7
+ margin:0;
8
+
9
+ }
10
+
11
+ header{
12
+
13
+ width: 100%;
14
+
15
+ height: 75px;
16
+
17
+ background-color: red;
18
+
19
+ position: fixed;
20
+
21
+ }
22
+
23
+ div{
24
+
25
+ font-size:14px;
26
+
27
+ }
28
+
29
+ .container{
30
+
31
+ background-color: green;
32
+
33
+ width: 1170px;
34
+
35
+ height: 75px;
36
+
37
+ margin:0 auto;
38
+
39
+ display: flex;
40
+
41
+ align-items: center;
42
+
43
+ }
44
+
45
+ .header-logo img{
46
+
47
+ height: 45px;
48
+
49
+
50
+
51
+ }
52
+
53
+ .header-logo{
54
+
55
+
56
+
57
+ display: inline-block;
58
+
59
+ }
60
+
61
+ .headline{
62
+
63
+ font-weight: 600;
64
+
65
+ display: inline-block;
66
+
67
+ margin-top: 7px;
68
+
69
+ }
70
+
71
+ .btn{
72
+
73
+ font-weight: 300;
74
+
75
+ text-decoration: none;
76
+
77
+ display:block;
78
+
79
+ padding:10px 39px;
80
+
81
+ color:white;
82
+
83
+ border-radius: 100px;
84
+
85
+ opacity: 0.7;
86
+
87
+ background-color: #FF3366;
88
+
89
+ }
90
+
91
+ .header-right{
92
+
93
+ margin:0 0 0 auto;
94
+
95
+ }
96
+
97
+ .header-right a:hover{
98
+
99
+ opacity: 1.0;
100
+
101
+ }
102
+
103
+
104
+
105
+ ```
106
+
107
+ ```HTML
108
+
109
+ <!DOCTYPE html>
110
+
111
+ <html lang="ja" dir="ltr">
112
+
113
+ <head>
114
+
115
+ <meta charset="utf-8">
116
+
117
+ <link rel="stylesheet" href="test_css.css">
118
+
119
+ <title></title>
120
+
121
+ </head>
122
+
123
+ <body>
124
+
125
+ <header>
126
+
127
+ <div class="container">
128
+
129
+ <div class="header-logo"><img src="C:\Users\kusud\OneDrive\画像\ドキュメント\新しいフォルダー\text fot atom\html.hmtl\isara\isaralogo.png" alt="isaralogo"></div>
130
+
131
+ <div class="headline">バンコクのノマドエンジニア育成講座</div>
132
+
133
+ <div class="header-right"><a class="btn" href="#">お問い合わせ / 資料請求はこちら</a><div class="header-right">
134
+
135
+ </div class="container">
136
+
137
+ </header>
138
+
139
+ </body>
140
+
141
+ </html>
142
+
143
+
144
+
145
+ ```
146
+
1
147
  検証モードを使用し、小さくしたりしてみると**個々の要素まで小さくなったり**、**ヘッダー高さがどんどん縮んでいきます。**
2
148
 
3
149
  要素の大きさを固定したいのですがどうすれば改善できるでしょうか?