質問編集履歴
1
コード追加しました!
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,2 +1,75 @@
|
|
1
|
+
```CSS
|
2
|
+
|
3
|
+
body{
|
4
|
+
margin:0;
|
5
|
+
}
|
6
|
+
header{
|
7
|
+
width: 100%;
|
8
|
+
height: 75px;
|
9
|
+
background-color: red;
|
10
|
+
position: fixed;
|
11
|
+
}
|
12
|
+
div{
|
13
|
+
font-size:14px;
|
14
|
+
}
|
15
|
+
.container{
|
16
|
+
background-color: green;
|
17
|
+
width: 1170px;
|
18
|
+
height: 75px;
|
19
|
+
margin:0 auto;
|
20
|
+
display: flex;
|
21
|
+
align-items: center;
|
22
|
+
}
|
23
|
+
.header-logo img{
|
24
|
+
height: 45px;
|
25
|
+
|
26
|
+
}
|
27
|
+
.header-logo{
|
28
|
+
|
29
|
+
display: inline-block;
|
30
|
+
}
|
31
|
+
.headline{
|
32
|
+
font-weight: 600;
|
33
|
+
display: inline-block;
|
34
|
+
margin-top: 7px;
|
35
|
+
}
|
36
|
+
.btn{
|
37
|
+
font-weight: 300;
|
38
|
+
text-decoration: none;
|
39
|
+
display:block;
|
40
|
+
padding:10px 39px;
|
41
|
+
color:white;
|
42
|
+
border-radius: 100px;
|
43
|
+
opacity: 0.7;
|
44
|
+
background-color: #FF3366;
|
45
|
+
}
|
46
|
+
.header-right{
|
47
|
+
margin:0 0 0 auto;
|
48
|
+
}
|
49
|
+
.header-right a:hover{
|
50
|
+
opacity: 1.0;
|
51
|
+
}
|
52
|
+
|
53
|
+
```
|
54
|
+
```HTML
|
55
|
+
<!DOCTYPE html>
|
56
|
+
<html lang="ja" dir="ltr">
|
57
|
+
<head>
|
58
|
+
<meta charset="utf-8">
|
59
|
+
<link rel="stylesheet" href="test_css.css">
|
60
|
+
<title></title>
|
61
|
+
</head>
|
62
|
+
<body>
|
63
|
+
<header>
|
64
|
+
<div class="container">
|
65
|
+
<div class="header-logo"><img src="C:\Users\kusud\OneDrive\画像\ドキュメント\新しいフォルダー\text fot atom\html.hmtl\isara\isaralogo.png" alt="isaralogo"></div>
|
66
|
+
<div class="headline">バンコクのノマドエンジニア育成講座</div>
|
67
|
+
<div class="header-right"><a class="btn" href="#">お問い合わせ / 資料請求はこちら</a><div class="header-right">
|
68
|
+
</div class="container">
|
69
|
+
</header>
|
70
|
+
</body>
|
71
|
+
</html>
|
72
|
+
|
73
|
+
```
|
1
74
|
検証モードを使用し、小さくしたりしてみると**個々の要素まで小さくなったり**、**ヘッダー高さがどんどん縮んでいきます。**
|
2
75
|
要素の大きさを固定したいのですがどうすれば改善できるでしょうか?
|